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

Bar chart, two dimensions and one measure with %

Hi there,

I have this question: One bar chart using two dimensions:

Dim1: =If (Atributo='A3_1_A' or Atributo='A3_1_B', [Aspecto Satisfaccion])

Dim2: =If (Atributo='A3_1_A' or Atributo='A3_1_B', Valor)

The result must looks like as a horizontal bar chart with each bar showing 4 colours (Column Valor): "Muy satisfecho", "Satisfecho", "Insatisfecho", "Muy insatisfecho". This is the measure:

= Count ( {< Atributo={"A3_1_A","A3_1_B"} >} Valor)  /  Count(TOTAL {< Atributo={"A3_1_A","A3_1_B"} >} Valor)

The problem is the line Count(TOTAL {< Atributo={"A3_1_A","A3_1_B"} >} Valor), because each bar rise until the 50% as a value, and not 100%.

If I use Count(TOTAL {< Atributo={"A3_1_A"} >} Valor) it's works fine for the first Atributo (A3_A_1) but it doesn't work for the second bar.

The second bar (A3_1_B) must be divided by Count(TOTAL {< Atributo={"A3_1_B"} >} Valor), but that is exactly the problem that I can't resolve.


Any comments and/or answers? I really appreciate.


Daniel


1 Solution

Accepted Solutions
sunny_talwar

Can you try this

=Count({<Atributo = {"A3_1_A", "A3_1_B"}>} Valor)/Count(TOTAL <[Aspecto Satisfaccion]> {<Atributo = {"A3_1_A", "A3_1_B"}>} Valor)

View solution in original post

2 Replies
sunny_talwar

Can you try this

=Count({<Atributo = {"A3_1_A", "A3_1_B"}>} Valor)/Count(TOTAL <[Aspecto Satisfaccion]> {<Atributo = {"A3_1_A", "A3_1_B"}>} Valor)

daniel_bernal_y
Contributor III
Contributor III
Author

Thank you!!!