Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
lailarhc
Creator
Creator

Wrong values displayed in bar chart

Hello.

This is probably a dumb problem, but I just can't seem to find the right expression to display the values I want on my bar chart.
Here's my expression for my bar chart: =Count(Aggr(Count(Curso), Servidor, Ano))

lailarhc_0-1624453668601.png 

It should show that 2 courses (curso) have been taken in 2021, but it's only showing 1. 

Here too, it's only showing 1 instead of 6.

lailarhc_1-1624454107228.png

Why is this happening?

Thank you in advance.

 

1 Solution

Accepted Solutions
sunny_talwar

Oh I see why that won't work... try this

=Sum(Aggr(Count(DISTINCT Curso), Servidor, Ano))

View solution in original post

5 Replies
sunny_talwar

Why don't you just use Count(Curso) here?

lailarhc
Creator
Creator
Author

It also gives me a wrong number: way higher than the actual count.

lailarhc_0-1624454689379.png

This should amount to 4, but it's showing 540.
I'm using Count(Curso) here

sunny_talwar

How about Count(DISTINCT Curso)??

sunny_talwar

Oh I see why that won't work... try this

=Sum(Aggr(Count(DISTINCT Curso), Servidor, Ano))
lailarhc
Creator
Creator
Author

It worked!
Thank you 🙂