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

Count number of occurrences in a chart

Hi everybody,

i'm trying to add a field in a chart to count the number of times a value in a specific field is repeated. This is what i have:

The field i'd like the value to be counted is "PDR" and, as you can see from the image, it's the same for both rows and what i need is a field that, in this case, gives me "2" as a result because the value contained in the "PDR" field is repeated twice.

I tried with the count distinct expression but it always returns "1" as a result, maybe i did something wrong (Siti.COD_DISTRIBUTORE_GAS it the complete name of the field labeled as "PDR" in the chart):

Count(DISTINCT [Siti.COD_DISTRIBUTORE_GAS])

Can anybody help me?

Thanks in advance,

Andrea

1 Solution

Accepted Solutions
sunny_talwar

What about this:

Count(TOTAL <REMI> [Siti.COD_DISTRIBUTORE_GAS])

Replace REMI with its actually field name.

View solution in original post

2 Replies
sunny_talwar

What about this:

Count(TOTAL <REMI> [Siti.COD_DISTRIBUTORE_GAS])

Replace REMI with its actually field name.

qv_bazz_10
Creator
Creator
Author

Got it Sunny! I tried your expression and the result was not really the one i was looking for, so i inverted the two fields and it worked perfectly!

Thank you very much Sunny, have a nice day!

Andrea