Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator III
Creator III

Set analysis based on lock period

here with i attach the sample app

if i selected the ID only the sales values are  displaying but without selecting the ID the sales values is zero.

i cant show zero in dashboard instead of that i want to show the MTD and YTD sales values for all IDs.

MY expression is

=sum({< Years={$(=Max(Years))},Months= {$(=Month(Addmonths(Max(UploadDate),$(vLockPeriod))))},ID>}sales)

4 Replies
sasikanth
Master
Master

hi,

Instead you can show always for a max ID ,

stephenedberkg
Creator III
Creator III
Author

=sum({< Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},MonthIDS={$(=Max(MonthID)+ $(vLockPeriod) )}>}sales)

when i select the ID that time only its working correctly without select the ID the sales is zero.

do you have any ideas for this?

sunny_talwar

$(vLockPeriod) evaluates to - (Null()) when no id is selected. and that is why AddMonths doesn't seems to be working. There are three options available within lock period field, which one would you want it to be without selection?

Capture.PNG

stephenedberkg
Creator III
Creator III
Author

Dear sunindia

i want the sum of all.i think its not possible in set analysis.

can we do anything in script?