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: 
ts3st1000
Contributor
Contributor

Display a limited set of a measure

Hi, I am showing a table but i would like to show only a limited set. In the example below i dont want to show the whole table.

countrysales
Japan10
Vietnam11
Malaysia12
China13

I would like to ignore China and Malaysia for example  and show only this:

 

countrysales
Japan10
Vietnam11

What is the expression for this please where i specify i am using country while excluding china and malaysia. thanks very much.

8 Replies
ogster1974
Partner - Master II
Partner - Master II

Calculated Dimension

IF(match(Country,'Japan','Vietnam'),country,null())

then exclude null on the dimension.

ts3st1000
Contributor
Contributor
Author

Thanks Andy, I have tried your expression but i was left with - in the rest of the rows. Is it possible to have an expression that excludes all the rows that i filter out, in this case keeping only rows where i have japan and Vietnam. Thank you.

ts3st1000
Contributor
Contributor
Author

Actually here i have country defined as a measure, not a dimension.

ogster1974
Partner - Master II
Partner - Master II

Why or how would you have a country as a measure surely the sales are the measure and the dimension is country?

Could you show how you get the country in your table.

ts3st1000
Contributor
Contributor
Author

I actually have a larger table with several columns and I would like to use an expression whereby: if a value is Zero, then don't show that row at all for all. In this case it could be country or even sales. Thank you.

ogster1974
Partner - Master II
Partner - Master II

You can use the same technique as I described except make the dimension only display if the measure condition you want to exclude on so for example

IF(AGGR(SUM(SALES),COUNTRY)=0,NULL(),COUNTRY) then exclude again.  Basically you cant exlude rows on the measure it needs to be done on the dimension but you can check for the measure condition in the dimension to identify which dimensions to include/exclude.

Anonymous
Not applicable

When you load the data, create a new column for country where you include only the ones that you'd want to use. If you'd want to exclude japan,

LOAD

if(country='Japan',null(),country) As Country2

Use column Country2 in your charts.

kaanerisen
Creator III
Creator III

Hi,

Measure:

Sum({<country-={'China','Malaysia'}>}sales)

By using this measure, China and Malaysia will be ignored and they are not shown on the table.

Hope this helps.