Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mohdhaniff
Creator
Creator

How to get Percentage for Sub Total on each dimension

Hi

Please help me how to get the Percentage. Currently I m using below formula in expression:

For % field:

Count(if(len(trim([Txn Month]))>0, AR_ID))  /   Count(TOTAL if(len(trim([Txn Month]))>0, AR_ID))

For NoA field:

Count(if(len(trim([Txn Month]))>0, AR_ID))

Result:

1.JPG

Issue:

Actually I want the result show the Total as 100 % for each Txn Month whereby the percentage of each Channel Type whereby the percentage for each Txn Month = NoA for Channel Type / NoA for Txn Month Total.

e.g.: for Non-Electronic (August)

         286,980 / 457,852 = 0.6268 (62.68 %)

Currently I can get 100% for the Grand Total only. How can I have result as below:

1.JPG

1 Solution

Accepted Solutions
sunny_talwar

How about this:

Count(if(len(trim([Txn Month]))>0, AR_ID))  /  Count(TOTAL <[Txn Month]> if(len(trim([Txn Month]))>0, AR_ID))

View solution in original post

2 Replies
sunny_talwar

How about this:

Count(if(len(trim([Txn Month]))>0, AR_ID))  /  Count(TOTAL <[Txn Month]> if(len(trim([Txn Month]))>0, AR_ID))

mohdhaniff
Creator
Creator
Author

Sunny, Thanks for the solution...