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

In bar chart im using MonthYear as dimension

Sorry Database we got the wrong data,thanks for your help

sunny_talwar

Is the issue resolved then?

NavinReddy
Creator II
Creator II
Author

=Count({<Month=,RAG_RATING_CD={'A'}, MonthYear={">=$(=date(MonthStart($(vMonth),-2),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}Metric)/

Count({<MonthYear=, MonthYear={">=$(=date(MonthStart(max(MonthYear),-2),'MMM YY'))<=$(=Date(max(MonthYear),'MMM YY'))"}>}Total <MonthYear>RAG_RATING_CD)

here im tying to implementing your previous logic

can you please help me

NavinReddy
Creator II
Creator II
Author

trying to implementing your logic on below expression don't know where can i use Total & Distinct function

=Count({<Month=,RAG_RATING_CD={'A'}, MonthYear={">=$(=date(MonthStart($(vMonth),-2),'MMM YY'))<=$(=Date($(vMonth),'MMM YY'))"}>}Metric)/

Count({<MonthYear=, MonthYear={">=$(=date(MonthStart(max(MonthYear),-2),'MMM YY'))<=$(=Date(max(MonthYear),'MMM YY'))"}>}Total <MonthYear>RAG_RATING_CD)

beck_bakytbek
Master
Master

Hi Niranjan,

i think, it is the same way if you try to calculate a weighted average

beck