Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)
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)