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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
LebogangT
Contributor II
Contributor II

Restricting Calculations when Selections are made

I have a Qlik Table which shows different dimensions and measures when selections are made. I got a request to only show a zero value, when these selections happen, the 'Sales Budget'  measure and Dimension 'Products' are selected. 

I tried using the following expression

if([_dimension] = 'Products' , Budget_Value = '0' , (sum({$<PD_Year_Num = {$(_vMaxYear)}>}[Budget_Value])))

but the issue is when other dimension are selected then values show again. The zero value should remain when the 'Sales Budget'  measure and Dimension 'Products' are selected even if they add other dimensions.

Labels (1)
1 Solution

Accepted Solutions
jbhappysocks
Creator II
Creator II

Hi

Try something like 

if(index(concat([_dimension],'|'), 'Products'), 0 , (sum({$<PD_Year_Num = {$(_vMaxYear)}>}[Budget_Value])))

Without really understanding how you want your table to function this should at least result in 0 when Products is selected.

 

View solution in original post

3 Replies
brunobertels
Master
Master

hi

May be this 

if([_dimension] = 'Products' AND  Budget_Value = '0' , sum({$<PD_Year_Num = {$(_vMaxYear)}>}[Budget_Value]))

jbhappysocks
Creator II
Creator II

Hi

Try something like 

if(index(concat([_dimension],'|'), 'Products'), 0 , (sum({$<PD_Year_Num = {$(_vMaxYear)}>}[Budget_Value])))

Without really understanding how you want your table to function this should at least result in 0 when Products is selected.

 

LebogangT
Contributor II
Contributor II
Author

This worked like a charm, thank you so much