Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator III
Creator III

Set analysis

i have two calendar one for uploading month and year and another one is forecast month and year

in my dashboard i made uploading month and year as calendar

quessss.png

but the above screen shot values is wrong

quessss.png

each code have some lock period like 1,2,3.

since code CP6426 has lock period as 2 i want the march sales values

i want achieve this without clicking march.

my expression is =sum({<Years={$(=Max(Years))},MonthIDS = {$(=Max(MonthIDS))}>}Sales)

how to write this logic in set analysis

16 Replies
tresesco
MVP
MVP

Is 144 your expected output when selecting Month-Jan, ID-2? If so, try like:

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

stephenedberkg
Creator III
Creator III
Author

no i want display 53.

we should not add two month sales values,we want to add only the month with lock period

tresesco
MVP
MVP

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

stephenedberkg
Creator III
Creator III
Author

=num(Sum({$< UYear = {$(=Max(UYear))} ,UMonthID = {$(=Max(UMonthID))},FMonthIDS={$(=max({$< UMonthID = {$(=Max(UMonthID))}

,UYear = {$(=Max(UYear))} >}FMonthIDS) )} > } sales),0.00)

i wrote like this

stephenedberkg
Creator III
Creator III
Author

tresesco


it is correct but when id is selected only its displaying the values.

when it is not selected the values is zero but i cant show like this in dashboard.




tresesco
MVP
MVP

Let us know what is your expected output when ID is not selected.

stephenedberkg
Creator III
Creator III
Author

for jan my output is should be 225 without selecting the id