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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
aaronnayan
Creator III
Creator III

Set analysis include date selection

Hi guys

I want to create a KPI to show last month sales.

I have created a date field to show this

SUM({<DATESORT={-1}>}Sales)

However If i select DATEMONTH, I want the above expression to be dynamic and change to the selected month.

Any ideas?

THanks,

Aaron

2 Replies
sunny_talwar

Then why are you hard coding this? May be try this

Sum({<DATESORT = {$("$(=Max(DATESORT)-1)"}>}Sales)

sunny_talwar

Or this

Sum({<DATESORT = {$("$(=Max(DATESORT)-1)"}, DATEMONTH>}Sales)