Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

mp802377
Contributor

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

Re: Calculated Dimension If Statement

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

2 Replies

Re: Calculated Dimension If Statement

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
Contributor

Re: Calculated Dimension If Statement

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

Community Browser