Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
praveenkumar_s
Creator II
Creator II

Show current week data in straight table

Hi gurus,

I have created straight table with the following data.By default, I need to show current week data only in straight table if user select any date value it will show the data for respective date in the straight table. Is there any other way to achieve it?.


please find the screenshot for your reference.

Screenshot_2.png

1 Solution

Accepted Solutions
dapostolopoylos
Creator III
Creator III

If i get straight, all you have to do is create a straight table with Metercode as Dimension an Max(Timestamp) as Expression...

You may have to use MaxString(Timestamp) alternatively depending on the data type of the Timestamp column...

Father/Husband/BI Developer

View solution in original post

7 Replies
sunny_talwar

Do you mean Current Day or Current Week? May be this

If(GetSelectedCount(Timestamp) = 0, Sum({<Timestamp = {"$(=Date(Today(), 'M/D/YYYY'))"}>}Measure), Sum(Measure))

dapostolopoylos
Creator III
Creator III

If i get straight, all you have to do is create a straight table with Metercode as Dimension an Max(Timestamp) as Expression...

You may have to use MaxString(Timestamp) alternatively depending on the data type of the Timestamp column...

Father/Husband/BI Developer
praveenkumar_s
Creator II
Creator II
Author

Hi,

Its current day.

Where i need to use this expression. in dimension or Expression in straight table?

rubenmarin

Hi praveen, maybe with set analysis using max(dateselected) as reference:

Only({<Timestamp={">=$(=WeekStart(max(dateselected)))<=$(=WeekEnd(max(dateselected)))"}>} Timestamp)

sunny_talwar

Expression

praveenkumar_s
Creator II
Creator II
Author

yes. exactly what i want. thank you very much.

dapostolopoylos
Creator III
Creator III

I'm glad i was able to help...

Father/Husband/BI Developer