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

Filter Table With Set Analysis

I have a table that i would like to filter based upon two conditions.  I have a KPI chart where my set analysis provide a correct count, and when I use similar set analysis in the table ... the number doesn't match.

KPI: Count({$<[Final Concern Risk Rating]={'High'},[Due Status]-={'Closed'}>}[Corrective Action ID])

Table: Only({<[Final Concern Risk Rating]={'High'},[Due Status]=-{'Closed'}>}[Corrective Action ID])

For example .. my KPI will show "2" and then i'll only receive 1 line in my table, would I would expect to see 2.  I've been spending too many hours on this haha, what am I doing wrong?

 

Labels (4)
3 Replies
trdandamudi
Master II
Master II

It is very difficult to say something without a sample. But there is a difference between the two expressions that you posted:

KPI: Count({$<[Final Concern Risk Rating]={'High'},[Due Status]-={'Closed'}>}[Corrective Action ID])

Table: Only({<[Final Concern Risk Rating]={'High'},[Due Status]=-{'Closed'}>}[Corrective Action ID])

 

For the KPI calculation it will consider the current selections where as for the table expression it will not consider current selections, because you are using = -  

Hoping might be that is the reason you are getting two different results.

 

laurentubesing
Contributor
Contributor
Author

Thanks for spotting that.  That's because I was trying different formulas to see if it worked.  I'm still getting mis-matched numbers.

 

I'm trying to return fields for data where they're due status is anything  but closed and their final concern risk rating is only High. The KPI number returns correctly ... but when I use a table to show the fields associated with that number ... it's not right

 

 

trdandamudi
Master II
Master II

Is it possible to post a sample here please. The definition of Only() function is :

"Only() returns a value if there is one and only one possible result from the aggregated data. For example, searching for the only product where the unit price =9 will return NULL if more than one product has a unit price of 9. "

See if the definition will help you to tweak your expression.