Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
dukane24
Contributor III
Contributor III

Chart showing data for last 7 days from date selected

Hello,

I am trying to create a bar chart like the one below showing data from the last 7 days from the date selected.  In the past I have accomplished this by creating an alternate state for the chart(s) and having a separate date selection, and then setting up an "on open" event with logic to select the last 7 days.  This approach is very clunky for the users.  I would like them to be able to drive the charts off of one date selection, which is usually defaulted to the current date, but the user is able to change it.

I have tried the following expression: =if(CLNDR_DT >= Today()-7 and CLNDR_DT < Today(), CLNDR_DT)

This works but only if no CLNDR_DT is currently selected.  Would it be possible to do something like this, for example, if only the current date is selected? Thank you in advance for your help!

Capture.PNG

Labels (2)
1 Reply
Brett_Bleess
Support (Former)
Support (Former)

Best I have is a specific Design Blog post on Set Analysis, which does have some related links at the bottom of it, and I will include the base URL for that Community area too such that you can search further if you wish for more posts, as this is our repository for our how-to related items that our internal people have written.

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Here is the Help link too:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

Sorry I am not more help, I tend to struggle with the development items, but this will kick things back up, so maybe someone better than me will leave an additional post clarifying something for you perhaps.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.