Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage calculation in chart

Hello, consider a column chart with the following:

Series: a, b, c

X-axis: X, Y, Z

|

  |

|

|

|_a b c__a b c__a b c__

       X          Y        Z

Looking at the following points on x-axis:

           X:                                 Y:

a =      5                                   8

b =      2                                   1

c =      7                                   3

(total = 14                                 12)

What I would like is the following values in chart:

           X:                                 Y:

a =      5/14=36%                      8/12=67%

b =      2/14=14%                      1/12=8%

c =      7/14=50%                      3/12=25%

  |

  |

  |

  |

  |_36 14 50__67 8 25__........

          X              Y

The numeric values is from count(value), so im not sure what the rest of the division should be.

Something like count(value) / [count(value) for all series on that one point on x-axis]

Thank you!

1 Solution

Accepted Solutions
MayilVahanan

Hi,

     Try like this,

     =Count(Value) / Count(total <X-axis Dimension> Value)

     Can you post a sample?

     Hope it helps

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

5 Replies
MayilVahanan

Hi,

     Try like this,

     =Count(Value)/Count(total Value)

     Can you post a sample?

     Edit:

     =Count(Value) / Count(total <X-axis Dimension> Value)

     Hope it helps

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

I have already tried that without luck.

MayilVahanan

Hi,

     Try like this,

     =Count(Value) / Count(total <X-axis Dimension> Value)

     Can you post a sample?

     Hope it helps

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

That worked as a charm! Do you mind explain what <....> does?

MayilVahanan

Hi,

     It calculate individual total values in dimension..For example:

   X total->  5+2+7 = 14          Y total ->      8+1+3 = 12

a =      5/14=36%                      8/12=67%

b =      2/14=14%                      1/12=8%

c =      7/14=50%                      3/12=25%

Hope you understand the concept.

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