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: 
NavinReddy
Creator II
Creator II

How to calculate percentage of each value in a filed

Dear Experts,

i am trying to displaying field value percentage using district and Total functions.

on chart for each value im getting the 100%. each value has less than 100% total would be 100%.

can some one help me to resolve this issue.

please find the expression im trying to displaying the percentage

=num(Count(DISTINCT{<RAG_RATING_CD=>}Metric)/COUNT(TOTAL <RAG_RATING_CD> DISTINCT Metric),'#,##0%')

Best Regards,

Niranjan

14 Replies
sunny_talwar

What is your dimension here?

sunny_talwar

May be try this if RAG_RATING_CD is your dimension:

=Num(Count(DISTINCT RAG_RATING_CD)/COUNT(TOTAL <RAG_RATING_CD> DISTINCT RAG_RATING_CD), '#,##0%')

Kushal_Chawda

try this

num(Count(DISTINCT Metric)/COUNT(TOTAL <RAG_RATING_CD> DISTINCT Metric),'#,##0%')

NavinReddy
Creator II
Creator II
Author

MonthYear is my dimension

NavinReddy
Creator II
Creator II
Author

if use below expression for distinct count i am getting only one value

=Count(DISTINCT RAG_RATING_CD)

NavinReddy
Creator II
Creator II
Author

hi, no changes on percentage im getting same

sunny_talwar

The object in the image is a list box? If not, what object are you using?

NavinReddy
Creator II
Creator II
Author

yes its list box only

sunny_talwar

You mentioned the dimension MonthYear? What was that dimension for? Do you want to calculate the % of each RAG_RATING_CD in the list box or another object?