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: 
danimarc12
Partner - Creator
Partner - Creator

KPI Expression Issue

Hello everyone!
I have an issue with an expression in my App.

I have a straight table with this dimension:
BrandIf(Aggr(sum({<Budget_Calc={">0"}>} Budget_Calc), marca) > 0, marca)

and these expressions:
Venduto: if(vMaiso=0, sum(importo*molt), sum({<codesterno-={'MAISO'}>}importo*molt))
Totale Budget: Sum(Budget_Calc)
Δ: Venduto / Budget

I want to display the value of Δ in a single KPI but I cannot write the right expression.

As you can see, the values are different:

danimarc12_0-1708353028521.png

Could anyone help me to solve my issue?

Thanks to all!

 

Labels (3)
6 Replies
Anil_Babu_Samineni

@danimarc12 Please share us the sample file to check?

The reason ask for it is, What if in case you have 2 records from table after using calculated condition for Brand.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
danimarc12
Partner - Creator
Partner - Creator
Author

How I can share the sample file? I'm using qlik cloud.

Sorry but I'm new in qlik.

Chanty4u
MVP
MVP

 

Try this 

Sum(if(vMaiso=0, importo*molt, {<codesterno-={'MAISO'}>} importo*molt)) /Sum(Budget_Calc)

 

danimarc12
Partner - Creator
Partner - Creator
Author

Hi @Chanty4u ,

thanks for your answer but it doesn't work because I need to insert the condition to keep only marca with "Budget_Calc > 0".

Pallav
Contributor II
Contributor II

You can try this - Num(Sum(Venduto)/ Sum(Total{1}Budget),'#0%')
danimarc12
Partner - Creator
Partner - Creator
Author

Hi @Pallav ,

thanks for you answer but, again, it miss the condition "keep marca where budget_calc > 0".