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

How to filter a table by a measure

Hey there,

I have a table with various dimensions and one measure.

Now, I always(pre-selected) want to display data were the measure has the value 1.

But how can I filter it?

Anyone can help me?

24 Replies
Not applicable
Author

I am the only one who has to say thank you.

I will test it tomorrow in the real app.

After that I will mark your answer as correct!

Many many thanks Jonathan!

JonnyPoole
Employee
Employee

Haha. No prob. Let me know how it goes. The basic method is as follows when you do have a dimension in the table that is a unique identifier for the chart

if (

     aggr(

     <Exact Measure Expression Here>   

     ,<Unique Dimension for the table rows Here>)=  <Value Filter in Here> ,

<Unique Dimension for the table rows Here>  )

...and hide the NULLs

if you don't have a unique dimension, pick one of the dimensions and change the expression. When doing this figure out if its 2,3  or all dimensions that are need to identify each row uniquely and then list them in a comma delimitted format for the 2nd argument of aggr()

if (

     aggr(

     <Exact Measure Expression Here>  

     ,<Dimension1 Here>, <Dimension2 Here>,<Dimension3 Here> et.... )=  <Value Filter in Here> ,

<Current Dimension for the table rows Here>  )

Not applicable
Author

Good morning ,

Its working very brilliant in our real app!

Our Contract_Key (Country number + Contract number) is actually only an unique identifier and in Sense there's probably no way to hide a column in a table.

I want to display only the Contract number not the Key so I'm working with your second method but there is and was no problem to customize it.

So, thank you very much again Jonathan, great work.

Thanks for your help!

Not applicable
Author

Thank you!!!

Anonymous
Not applicable
Author

Hi Jonathan,

Can you please take a look at my question in the thread below and let me know if there's a workaround to achieve the desired result? Thanks!

https://community.qlik.com/message/1106829?et=watches.email.thread#1106829