Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

selvakumara
New Contributor III

KPI values is empty if any category selected in Bar chart

Hi,

I have Bar char and KPI.

Initially the KPI shows total number but if i selected any of the particular category if always shows zero.

Can you please help me on this.

Bar chart expression : 

=if([days] <=7, '0-7 Days'

,if([days] <=30, '8-30 Days'

,if([days] <=60, '31-60 Days'

,if([days] <=90, '61-90 Days'

, 'Over 90 days'

))))

KPI Expression :   SUM([Total Discharges])

44.PNG3.PNG

Thanks in advance.

Thanks,

Selva

6 Replies
sureshqv
Esteemed Contributor III

Re: KPI values is empty if any category selected in Bar chart

what is the measure in bar chart ?

do you have multiple tables in script?   if yes mention the flag in KPI 

selvakumara
New Contributor III

Re: KPI values is empty if any category selected in Bar chart

Measure :

Count([Re-admit Days]) for Bar charts

thevingo
Contributor

Re: KPI values is empty if any category selected in Bar chart

Hi

please check your data-model/script

or try bucket calc in backend-script

selvakumara
New Contributor III

Re: KPI values is empty if any category selected in Bar chart

ok let me try

Re: KPI values is empty if any category selected in Bar chart

check whether you have any values for the days <=7 [Total Discharges] in this column

rittermd
Honored Contributor

Re: KPI values is empty if any category selected in Bar chart

I would not do that calculation in the bar chart.  I would do it in your load script and store the value in a field.  Then simply do a count in the bar chart and in the KPI.

Much more efficient and less code to deal with in the dashboard.

Community Browser