Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to have a KPI with values from the previous month in an app, and I don't know how to do that easily. I want to use an expression that looks something like:
Sum({$<Period={Magic}>}Size)
...such that the size for the previous month is shown in the KPI. What code can I use in the Magic section of that expression? The autoCalendar expressions didn't do anything since they just pick up the actual time from the computer and not the stored time data in the database.
Hi Materi,
Can you post a sample app here?
I use the following expression in the load editor to make a variable:
Let vLastMonth = date(AddMonths(today(), -1), 'MM');
This returns the number of last month so in my case it says '07' right now. So in your case the set expression will be something like this: Sum({$<Month={$(vLastMonth)}>}Size)
Maybe this helps.
sincerely,
Rick
Thanks for your response, Rick! But my problem is that I need to take the dates from my server, so I can't use the real time and thus not the built-in Date expressions in Qlik.
Can you post the date format that you import from your server?