Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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.

Tags (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: sum changes with time

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


talk is cheap, supply exceeds demand
4 Replies
MVP & Luminary
MVP & Luminary

Re: sum changes with time

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

Re: sum changes with time

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?

MVP & Luminary
MVP & Luminary

Re: sum changes with time

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


talk is cheap, supply exceeds demand
Not applicable

Re: sum changes with time

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