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

How do I add a column to the alternate state so that it works as a filter?

I have a date picker and a chart that have one alternate state "StateA". I need the chart to react the same way to the KIC column selection. To do this, I wrote the following expression into the chart :
count({State1<KIC = $::KIC>} id)


But in this case, if no filters are selected, the expression counts only those id that have a value in the KIC column. That is, the KIC is not empty.

How to make it so that if there are no filters, the total value does not change. When adding KIC to an expression with an alternate state?

 

Example dataset:

Dmitryromanov23_0-1683624216461.png

 

Labels (3)
1 Solution

Accepted Solutions
MayilVahanan

HI

Try like below

If(GetselectedCount(KIC) = 0, count({State1} id), count({State1<KIC = $::KIC>} id))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

HI

Try like below

If(GetselectedCount(KIC) = 0, count({State1} id), count({State1<KIC = $::KIC>} id))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.