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: 
ganga9211
Contributor
Contributor

How to Calculate Percentages setting up multiple criteria's?

The Following Expression using multiple criteria on Dates, helps me Calculate percentage considering Grand total, and now I want to Calculate this Percentages using the Total of each Leads. 

 

(count({<[Role End Date]={'>=Today()'}>}distinct [ID])+count({<[Role End Date]={'-'}>}distinct [ID]))
/
(count({<[Role End Date]={'>=Today()'}>}distinct TOTAL [ID])+count({<[Role End Date]={'-'}>}distinct TOTAL [ID]))

The percentages calculated in the table below are based on the Grand total instead of the Lead Total, hence cn someone pls help with this calculation

SAC Lead High cost Low cost Total High cost Low cost Total
      Total     Total
A 34 26 60 3% 2% 5%
B 5 5 10 0% 0% 1%
C 1 46 47 0% 2% 2%
A 23 46 69 2% 4% 6%
B 9 66 75 1% 6% 6%
C 12 121 133 1% 11% 12%
A 11 96 107 1% 8% 9%
B 5 23 28 0% 2% 2%
C 13 1 14 1% 0% 1%
A 2 11 13 0% 1% 1%
B 98 342 440 6% 23% 29%
C 45 149 194 4% 12% 16%
A 34 23 57 3% 2% 5%
B 1 - 1 0% - 0%
C 8 8 16 1% 1% 1%
A 9 28 37 1% 2% 3%
Grand Total 310 991 1301 24% 76% 100%
Labels (2)
1 Reply
rubenmarin

Hi, the TOTAL clause is used to ignore dimensions, but you can set wich fields don't have to be ignores setting this fields betweeen '<' and '>', so you can try with:

count({<[Role End Date]={'>=Today()'}>}distinct TOTAL <SacLeadFieldName> [ID])+count({<[Role End Date]={'-'}>}distinct TOTAL <SacLeadFieldName> [ID])