Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I am facing Set Analysis issue in Qlikview 11.2 v
The issue is
I have to show the total sum in the set expression for the last month from date
Eg: I have data for some days ( the dates may be from Jan, Feb, Mar), i have to display the data based last month. As of now we got 3 months data in future there may be a chance to increase. I used static value in set expression like below, it worked, but when I place dynamic expression it's not work.
The below one works
Static: sum({<Month={"Mar"}>}sales)
The below one not working
Dynamic :
sum({<Month={$(=Max(Month))}>}sales)
Can any one help me to solve this
Alternatively, you can try this also:
Sum({<MonthNum = {$(=MaxString(MonthNum))}>}sales)
Can you create a new field in the script like this:
Num(Month(Date)) as MonthNum
and use that in your set analysis?
Sum({<MonthNum = {$(=Max(MonthNum))}>}sales)
UPDATE: Also check if Max(Month) in text box gives you 3. If month only is month and doesn't contain Year and you have more than 1 years you might get a 12 in which case the set analysis will give a different result compared to Mar.
Alternatively, you can try this also:
Sum({<MonthNum = {$(=MaxString(MonthNum))}>}sales)
How you have created the Month in your script? if it is created using Month function in the script then this should work.
I derived the month from date
Month(pl_date) as Month
then try this
=sum({<Month={"$(=Max(Month))"}>}sales)
Hi Sunny,
It's working.
Thanks for your immediate response
Thanks alot
Thanks you Guys for your un believeble support
Thanks
AR UMAMAHESH
Hi Sunny, Can this logic works for before last month
Ex: For Feb
Sum({1<Month={$(=MaxString(Month)-1)}>}sales)
For Jan
Sum({1<Month={$(=MaxString(Month)-2)}>}sales)
I tried these but not works