Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tvisha
Creator II
Creator II

Plotting last 7 days in bar chart

Hi,

I want to plot the last 7 days on a bar chart. I googled and searched, but cannot get a solution.

If I put the date in descending order, then limit the value to last 7, it is by default doing it on the measure as count(number) and not last 7 days. How do I proceed.

Thank You,

Renu

5 Replies
Digvijay_Singh

You need to have a set expression something like this in your measure  - 

count({<Date = {">=$(=max(Date)-7)<=$(=max(Date))"}>}number)

tvisha
Creator II
Creator II
Author

How and where I use this in a graph or a table? 

I did created the expression and the KPI is coming correctly

 

thanks

Digvijay_Singh

You mentioned you want to use that in Bar chart so use it in the bar chart measure, not sure whats your dimension would be, please share more info in case you need further help..

tvisha
Creator II
Creator II
Author

Attaching a sample data. Here I need a bar chart or a table, listing only the last 7 days...eg. in Bar chart, last 7 days, and count for each day. Attaching the sample data sheet.

tvisha
Creator II
Creator II
Author