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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
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)