Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum changes with time

hi guys,

I i've a chart wich display a year to date information, my problem is when i select several month's my Production costs information is incorrect but when i only choose one month it's correct, it seems to be doing some kind of average or something.

My expression: =sum({$ <Responsible = {"=RaiserPlantID=Responsible"}>} Auth*XRATE2USD)

When several Months are selected:

SeveralMonths.png

when only jan is selected:

jan.png

as you can see the amounts are incorrect when several month are selected.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try sum(if(RaiserPlantID=Responsible,Auth*XRATE2USD,0))


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The problem is likely your set modifier Responsible = {"=RaiserPlantID=Responsible"}. The set is calculated for the entire chart, not a set per month. Perhaps you need to use an if statement instead. Perhaps this document helps understanding what's going on: set_analysis_intra-record.qvw


talk is cheap, supply exceeds demand
Not applicable
Author

What you are saying it's the chart only set analyses once and i need it to do it per month, do you have suggestion how to accomplish with a if stat?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try sum(if(RaiserPlantID=Responsible,Auth*XRATE2USD,0))


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks it worked, i had already tried something near your expression but the result was the same but at the time i couldn't understand the problem after your explanation the if statement makes sense. Thanks