Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
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)