Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use a calculated dimension to force chart to only look at pre selected value

I have a field called disability.  I wantto force a chart to only look at a particular type of disability.  Do I use a calculated dimension to do this and what would the expression look like?

Thanks

Greg

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You're probably better of using a set analysis expression. For example if your chart uses the expression sum(Amount) you can change that to sum({<MyDisabilityField={'Legless'}>}Amount) to filter out any records that don't have Legless as value in the field MyDisabilityField.

If you think you do need a calculated dimension you can use something like =if(MyDisabilityField='Legless', MyDisabilityField) and make sure to suppress null values for the calculated dimension.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

You're probably better of using a set analysis expression. For example if your chart uses the expression sum(Amount) you can change that to sum({<MyDisabilityField={'Legless'}>}Amount) to filter out any records that don't have Legless as value in the field MyDisabilityField.

If you think you do need a calculated dimension you can use something like =if(MyDisabilityField='Legless', MyDisabilityField) and make sure to suppress null values for the calculated dimension.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks very much

alexandros17
Partner - Champion III
Partner - Champion III

in the calculated dimension write:

If(disability = 'myDisability', disability, Null())

where myDisability is the value you want to fix

then check the box "Suppress when value is null"