Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How get the last 7 days data

Hi All,

How to get the last 7 days data, 6 days, 5 days  data on bar chart as per the user selection. Here I have created a button for 7 days with trigger (='=New_Date>(Today() - 7)' ). Again I created another button for 6 days button. Instead of creating this stuff multiple times, is there any other solution where user can select the same values through list box.

Thanks in advance

Regards

Krishna

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Check enclosed file...

View solution in original post

8 Replies
MK_QSL
MVP
MVP

Check enclosed file...

Not applicable
Author

Thanx alot Manish ...have been trying this for nearly 3 hrs..

Regards

Krishna

buzzy996
Master II
Master II

u can also try,by creating one variable (vDays) ask user to put any value in that variable to see those many days bars into chart,by using the below exp.

SUM({<Date = {">$(=Date(Max(Date)-vDays))<=$(=Date(Max(Date)))"}>}Sales)

Not applicable
Author

Hi Manish,

I have tried your expression according to my requirements, but for some reason its not working. Could u please help me in achieving same in attached qvw.

I have few other queries Manish, regarding the triggers which are in qvw( 7 days, 6 days, 5days). when i press them in order i can see the changes but if do it in the reverse order..its not happening.

And finally Manish ..would u pls suggest me reference guide for qlikview expressions as I'm facing difficulty in writing expressions

Thnx in advance !

Regards

Krishna !

mukesh24
Partner - Creator III
Partner - Creator III

Hi Krishna,

Create User Input Box where user can enter number of days & use these variable to deduct number of days from selected date.

Regards,

Mukesh

Not applicable
Author

Hi Mukesh,

Would you please help me acheving that in qvw which is posted above.., Manish has replied with correct answer but still I'm unable to get that as per my requirement .

Thnx

Krishna

buzzy996
Master II
Master II

try this

Not applicable
Author

Thnx Shiva

Regards

Krishna