Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
JanB
Contributor
Contributor

Last 14 day average from data set

Hi,

I am new to Qlik Sense and have developed a dashboard that has worked well. On Monday the dashboard broke after IT upgraded to the new release Qlik Sense February 2020. 

I have a run chart and I am displaying only the last 14 days of data. Dimension is Date and Measure is FulFilledDoses. The whole table has a year worth of information but I only show the last 14 days by including the following expression

Dimension:

=if(DispenseDate >= today()-14 and DispenseDate< today(), DispenseDate)

Measure:

=if(DispenseDate >= today()-14 and DispenseDate< today(),Sum(FulfilledDoses))

which is working great. 

Now I have a KPI value for the FulfilledDoses and I need to create an average for the last 14 days and I use the following expression

=avg({$<Date={">$(=Date(Max(Date)-14))<=$(=Max(Date))"}>}FulfilledDoses)

This has worked great until the IT update. Now the value that is calculated is for the whole data set and it ignores the last 14 days I am trying to show.

Any suggestions on what is going on?

Labels (1)
2 Replies
squeakie_pig
Creator II
Creator II

Check if the Date format has changed.  

JanB
Contributor
Contributor
Author

Date in the raw data table I am pulling from is still showing as MM/DD/YYYY.