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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
JelleBosschaart
Contributor
Contributor

#KPI Of sum over last 7 days

So, I'm creating a Qlik Sense Dashboard which is supposed to show some simple stuff about an excel sheet (my data).
The data is private, so I can not share.

In the excel are 2 important data points per row: OrderDate and OrderSales.
I want to sum over the last 7 days of OrderSales to compare with the other weeks.

I tried to use some things in this range: sum({<OrderDate.autoCalendar.Date={"$=Date(today()-7)"}>} OrderSales)
But it just wouldn't work for me. (This would show 0 in the KPI, also because my data does not go till today, the maximum is 30 Dec 2019, but I do want it to change automatically when I add new data.

Does anyone have any tips for me?

Thanks in advance,

Jelle.

1 Reply
jwjackso
Specialist III
Specialist III

I recommend Henric's As-Of-Table  for these calculations.  If you added a daydiff flag, the sum of the last 7 days would be Sum({<daydiff={"<6"}>} OrderSales) and the sum of the previous 7 days would be Sum({<daydiff={">=6<14"}>}OrderSales)