Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sanjujeeboy
Creator
Creator

How to achieve this logic

sanjujeeboy_0-1591193143498.png

i want to achieve the Actual spend as 3000. Logic: Whenever Target>actual it should show spend for that category 

so for Laptop target>actual so only laptop spend should appear in Actual spend.

Currently what is happening is when i click on Accessories its adding the targets of both mobile and laptop and actuals of mobile and laptop. so combining both together target is becoming greater than actual and im getting Actual spend as 4000.

@sunny_talwar @jagan 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Change your expression for Actual Spend to

Sum(Aggr(if(sum({<plan={'Target'}>}values) - sum({<plan={'Actual'}>}values)>0, sum({<plan={'Spend'}>}values) ,0), Phase, Category, Accesory))

image.png

View solution in original post

4 Replies
sunny_talwar

The information provided is not enough to know what you have (expressions, dimensions, logics etc) to answer your post. Are you able to provide a sample where we can see this?

sanjujeeboy
Creator
Creator
Author

Hi Sunny,

I have attached the QVF file as well as the excel used. I have also described the requirement in the app.

Kindly look into this.

Thanks

@sunny_talwar 

 

sunny_talwar

Change your expression for Actual Spend to

Sum(Aggr(if(sum({<plan={'Target'}>}values) - sum({<plan={'Actual'}>}values)>0, sum({<plan={'Spend'}>}values) ,0), Phase, Category, Accesory))

image.png

sanjujeeboy
Creator
Creator
Author

Thanks Sunny!!! its working as required.