Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Siddhant1
Contributor
Contributor

data is not coming in KPI

I am using this  formula

sum({<Consumption_Date={">=$(=monthstart(max(Consumption_Date),-1))<=$(=monthend(max(Consumption_Date),-1))"}>}comsumed_qty *price ) +SUM(count(sap_code)*price)

when I am using this formula in the table the  total is coming and when using this in KPI the sum is coming NULL  screenshots attached below

 

Siddhant1_0-1680000331980.png

Siddhant1_1-1680000369362.png

 

 

2 Replies
vamsee
Specialist
Specialist

May be your date formats are an issue

try

sum({<Consumption_Date=

{">=$(=Date(Floor(monthstart(max(Consumption_Date),-1))))<=$(=Date(Floor(monthend(max(Consumption_Date),-1))))"}>}
comsumed_qty *price ) +

SUM(count(sap_code)*price)
Gabbar
Specialist
Specialist

Your expression is wrong because nested Aggregation is not allowed in qlik sense which means that:- 
SUM(count(sap_code)*price)      this expression cannot generate data, data is coming in table where the other part or first part of expression can generate results.

Try Changing this part of expression to:- 
SUM(aggr(count(sap_code),price)*price)