Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Expression not ignoring selections

Hi all,

I have an expression in the attached QVW that even though in my set analysis i am telling it to ignore selections on Year and Period it doesnt seem to be ignoring them.

I have the same expression in the chart and text box and both are doing the same thing.

The expression is..

=Sum(Aggr(

(((sum({<$(vDatePeriod),Currency={'USD'},ForecastVersion=, Manufactured_Flag={0}>}[Latest Cost])

/

(1+sum({<$(vDatePeriod),ForecastVersion=,Currency={'USD'}>}[Freight %])+sum({<$(vDatePeriod),ForecastVersion=,Currency={'USD'}>}[Duty %])+sum({<$(vDatePeriod),ForecastVersion=,Currency={'USD'}>}[Demurrage %])))

*

sum({<$(vDatePeriod),ForecastVersion=, Currency={'USD'},Manufactured_Flag={0}>} [Sales Volume]))

-

((((sum({<$(vDatePeriod),ForecastVersion=, Currency={'USD'},Manufactured_Flag={0}>}[Latest Cost])

/

(1+sum({<$(vDatePeriod),ForecastVersion=, Currency={'USD'}>}[Freight %])+sum({<$(vDatePeriod),ForecastVersion=, Currency={'USD'}>}[Duty %])+sum({<$(vDatePeriod),ForecastVersion=, Currency={'USD'}>}[Demurrage %])))

*

sum({<$(vDatePeriod),ForecastVersion=, Currency={'USD'},Manufactured_Flag={0}>} [Sales Volume]))))

*

(1.3

/

only({<$(vDatePeriod),ForecastVersion=>}FX_Rate))),

SubCat, SubCat1, Item,[Customer Name],Sales_Counter))

The variable vDatePeriod contains the Year=,Period= and ive also tried it without using the variable but i get the same result.

If you clear all selections, you will see that the value in the chart and text box is -210171, this is the correct value that i want to display when any Year and Period is selected.

Can anyone spot anything that i am doing wrong?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Sum(Aggr

That first sum doesn't contain a set modifier to make it ignore selections. Try Sum( {<Year,Period> } Aggr( ... etc


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Sum(Aggr

That first sum doesn't contain a set modifier to make it ignore selections. Try Sum( {<Year,Period> } Aggr( ... etc


talk is cheap, supply exceeds demand
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Damn! i completely forgot about the first sum!

Thanks!