Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Turn IF Expression to Calculated Dimension

Hi,

I'm trying to turn the following expression in a straight table to a calculated dimension. I can't get the syntax right. Can anyone help?

=If(Count(DISTINCT{<[Store Status]= {'Not On Store'}>} Territory) > 0, [Territory Name],Null())

Thanks!

2 Replies
ramoncova06
Partner - Specialist III
Partner - Specialist III

whenever you use an aggregation as part of a calculated dimension you need to use aggr


aggr(only({<[Territory Name] = {"Count(DISTINCT{<[Store Status]= {'Not On Store'}>} Territory) > 0"}>} [Territory Name]),[Territory Name])



Not applicable
Author

Try Like below:

IF( Aggr( Count(DISTINCT{<[Store Status]= {'Not On Store'}>} Territory) , [Territory Name]) > 0 , [Territory Name] )