Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Percentage calculation

Hi Experts,

Can any please help me on Below requirement.

I have a  pivot table like below from Measure please help me to calculate the Percentage column

Dimension            Measure(Count(ID))                  Percentage

Sales     

Product 1               43                                              -

Product 2               21                                             21/43 = 48.84%

Product 3               22                                             22/43=51.16%

Division

Product 1               4                                              -

Product 2               1                                            1/4 = 25.00%

Product 3               3                                             3/4=75.00%


Thanks in advance

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({<Dim2 -= {'Product1'}>} Ids)/Sum(TOTAL <Dim1> {<Dim2 = {'Product1'}>} Ids)


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

May be this

Count(ID)/Count(TOTAL {<Division = {'Product 1'}>} ID)

or

Count({<Division -= {'Product 1'}>} ID)/Count(TOTAL {<Division = {'Product 1'}>} ID)

ahmar811
Creator III
Creator III

Try,

Count(ID)/max(Total Count(ID))



mahitham
Creator II
Creator II
Author

Hi Sunny,

Thanks for your reply. I have tried both expression which you have mentioned. But those are not working. Please find the below attached sample app with expected output.

Here Dim1 Division Product1 sum need to use for dividing remaining two products same like Dim1 Sales Product1 sum need to use for dividing remaining two products.


Please help me on this.

Thanks in advance.

Percentage.png

sunny_talwar

Try this

Sum({<Dim2 -= {'Product1'}>} Ids)/Sum(TOTAL <Dim1> {<Dim2 = {'Product1'}>} Ids)


Capture.PNG