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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pragun
Partner - Contributor II
Partner - Contributor II

IF statement with two measures one with set analysis other without it

When I write this code in measure without Else Condition:

if(vDate=4,
pick(vEarning,
Sum({<ProdWorkDate={">=$(=WeekStart(Max(ProdWorkDate)))<=$(=Max(ProdWorkDate))"}>} Wages)))

Code With Else Condition of Sum(Wages)

if(vDate=4,
pick(vEarning,
Sum({<ProdWorkDate={">=$(=WeekStart(Max(ProdWorkDate)))<=$(=Max(ProdWorkDate))"}>} Wages)),Sum(Wages))

 


Without Else ConditionWithout Else ConditionWith Else ConditionWith Else Condition

I want to know why is qlik showing all the dates when i put something in else condtion

4 Replies
sunny_talwar

May be all you need to do is to uncheck 'Include zero values' under Add-ons -> Data handling

Pragun
Partner - Contributor II
Partner - Contributor II
Author

Hi, I can do that but the problem is I have date for which I have no data but I still want to show that on UI. Also I am interested in knowing the reason behind this behavior
sunny_talwar

I am not sure, but if you are able to share a sample, we can take a look at it to see what might be going on

Pragun
Partner - Contributor II
Partner - Contributor II
Author

Sorry but I would not be able to share the sample but I discussed this with my colleague he said he also faced the same issue when using 2 measure one with set analysis and other without it