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

keep variable value after filtering table/chart

Hello everyone!

Would you please tell me, how can I store a value to variable so it doesn't change when I filter table?

Let's say I have a table 

LOAD * Inline [

name, value,

a, 1,

b, 2,

c, 3,

a, 2

];

 then I create a variable called "dist_names" which would count distinct names (3 in this case), and then, even if I filter this table or chart, the variable would remain the same (if I filter on "a", "b" the variable "dist_names" would still be 3, not 2)?

Thank you in advance!

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this

Count({1} Distinct name)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

Try this

Count({1} Distinct name)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful