Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mp802377
Creator II
Creator II

Calculated Dimension If Statement

I have an expression I need to make a calculated dimension so I can suppress null values (I only want to show values that have a 1 in the field).

this is the working expression:

If(Count({$<SITE={$(=[Base Site])}, FIELD1=, FIELD2=>} TOTAL<SITE, MARKET> FARE) = 0 and FARE = Min({$<FIELD1=, FIELD2=>} TOTAL<SITE, MARKET> FARE), 'Missing')

I, of course, didn't work when I put it in the calculated dimension

I also tried this in the calculated dimension:

aggr(If(Count({$<SITE={$(=[Base Site])}, FIELD1=, FIELD2=>} TOTAL<SITE, MARKET> FARE) = 0 and FARE = Min({$<FIELD1=, FIELD2=>} TOTAL<SITE, MARKET> FARE), 'Missing'),'Missing')

Thank you,

Martha

1 Solution

Accepted Solutions
rubenmarin

Hi Martha, Aggr parameters should be the field that you want to iterate the expression, not a string, can you try ending the expression as:

...TOTAL<SITE, MARKET> FARE), 'Missing'), FieldName)


Where FieldName should be the dimension used in the table where the expression is working, separated by commas if these needs more than one dimension.


Selections in the aggr column of the 'Missing' value will make the selections in the fields used as Aggr() parameters

View solution in original post

2 Replies
rubenmarin

Hi Martha, Aggr parameters should be the field that you want to iterate the expression, not a string, can you try ending the expression as:

...TOTAL<SITE, MARKET> FARE), 'Missing'), FieldName)


Where FieldName should be the dimension used in the table where the expression is working, separated by commas if these needs more than one dimension.


Selections in the aggr column of the 'Missing' value will make the selections in the fields used as Aggr() parameters

mp802377
Creator II
Creator II
Author

Thank you! I don't know what I was thinking.