Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

KPI results in " - "

I'm trying to calculate the percentage hours toward monthly goal.  Separately, I've confirmed that my numerator and denominator give me the desired results, but when I try to divide the numerator by the denominator, I get " - " in my KPI.  The calculation is:

Sum(if(BUDGET_MONTH_CAL=MONTH(TODAY()),duration/60)))/if(BUDGET_MONTH_CAL=MONTH(TODAY()), BUDGET_AMT_PROG)

Should I be calculating this percentage?

Tags (1)
12 Replies
MVP
MVP

Re: KPI results in " - "

May be try this:

Sum({<BUDGET_MONTH_CAL = {"$(=Month(Today()))"}>} duration/60)/Only({<BUDGET_MONTH_CAL = {"$(=Month(Today()))"}>} BUDGET_AMT_PROG)

Not applicable

Re: KPI results in " - "

Hi Sunny - Thank you very much for responding.  Unfortunately, same result, though.

MVP
MVP

Re: KPI results in " - "

What values do you get for them individually? Is it a very small number divided by a huge number? (10/10000?) May be we just need to format it correctly to view it.

Not applicable

Re: KPI results in " - "

Current numbers are 195 / 925.  I have the formatting set to custom at ##%.

balrajahlawat
Esteemed Contributor

Re: KPI results in " - "

try like this?

num((Sum({<BUDGET_MONTH_CAL={'=$(=MONTH(TODAY()))'}>} duration)/60)

/

Sum({<BUDGET_MONTH_CAL={'=$(=MONTH(TODAY()))'}>} BUDGET_AMT_PROG)),'#,##0%')


Note: Make sure BUDGET_MONTH_CAL should have numeric value as Month() will return 1,2,3,4 etc

Not applicable

Re: KPI results in " - "

Hi Balraj - No luck with that.  One thing I did just test is if I entered the actual value for the denominator vs. the calculated numerator and vice versa.

If I enter the actual numerator and calc the denominator, I get "-".

If I calc the numerator and enter the actual denominator, I get the desired results.

Not sure if that means anything.

MVP
MVP

Re: KPI results in " - "

Can you change the formatting to regular number formatting and see if you see 0.21

balrajahlawat
Esteemed Contributor

Re: KPI results in " - "

It means your actual denominator part of expression is not working?

Not applicable

Re: KPI results in " - "

It's not working when I combine it with the numerator, but when each of them stands alone, they are fine.