Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
gauravgg
Partner - Creator
Partner - Creator

Same expression in KPI not working

Hi all

I have the following expression   in Table

(Max(aggr(sum(PRICE_MAT_New),MATERIAL,PLANT,VENDOR,PRICE_MAT_New))

-

Min(aggr(sum(PRICE_MAT_New),MATERIAL,PLANT,VENDOR,PRICE_MAT_New))

)

*

FirstSortedValue(VOLUME,

-aggr(sum(VOLUME),MATERIAL,VENDOR,PRICE_MAT_New)

)

When i export the table in excel and sum the calculated column it comes around 66 cr

But the same expression when i put in KPI object it shows some different value

In KPI also it should show 66 cr.

Can anyone help me in this?

Thanks in advance

4 Replies
tresesco
MVP
MVP

Try using an aggregation on your expression, like:

Sum( Aggr( <YourExpression> , <Dimension in chart>))

gauravgg
Partner - Creator
Partner - Creator
Author

hi Tresesco ,

I tried ,but there might be some syntax error.

Can you help me in converting the expression into aggr

tresesco
MVP
MVP

Please share your sample app.

mdmukramali
Specialist III
Specialist III

Hi,

What is the output you are getting when you are using only below expression in the KPI.

FirstSortedValue(VOLUME,

-aggr(sum(VOLUME),MATERIAL,VENDOR,PRICE_MAT_New))

?