Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

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 II
Creator II
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 II
Creator II
Author

Dear sunindia

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

can we do anything in script?