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
just create the Month Year field in script using
=monthname(pl_date) as MonthYear
then you get the all expression
Current Month
Sum({1<MonthYear={"$(=monthname(max(MonthYear)))"}>}sales)
Ex: For Feb
Sum({1<MonthYear={"$(=monthname(addmonths(max(MonthYear)-1)))"}>}sales)
For Jan
Sum({1<Month={"$(=monthname(addmonths(max(MonthYear)-2)))"}>}sales)
Hi,
ok . Issue was in max() it convert into number and when we use addMonths()
then it again try to convert it into date which cause the issue.
Regards
Precisely
Hi,
We can simply use addmonths() on datefield
In his case
Month(AddMonths(max(pl_date),-1))
give better result.
Regards
So essentially basing it of date field instead of Month field? That make sense
Ya it's working Sunny
Thank you very much
Thank you guys
After all your support and help
I closed a big issue in my work
Thanks for your efforts and helping
Thanks,
AR UMAMAHESH
Hi Sunny,
It is not working for me. It is not giving exact result. Please help.
Regards,
Khalander