Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have a line chart where I want to show the trendline between the max year selected and the previous year of the sales for the products A,B,C with the following expression:
sum({$*<[Product]={'A','B','C'},[Year]={$(=Max(Year])),$(=Max([Year])-1)}>} sales)
My problem is that if I select product A and year=2017. I want only to see the trendline for that specific product that's why I've included $* before the condition but at the same time, with this set modifier , the max year selected (2017) appears but not the previous year (2016).
Could you please give me any advice about how I could show the product selected and the max year selected + previous year?
Thanks in advance
Try
sum({$<[Product] *= {'A','B','C'},[Year]={$(=Max(Year])),$(=Max([Year])-1)}>} sales)
so that the intersection applies to only the Product field modifier.
Try with and make changes in youri expresssion
//The expression works for max year to previous year
sum({$<[Product]={'A','B','C'}, [Year] = { ">=$(=Max(Year])-1) <=$(=Max([Year]))" }>} sales)
Try
sum({$<[Product] *= {'A','B','C'},[Year]={$(=Max(Year])),$(=Max([Year])-1)}>} sales)
so that the intersection applies to only the Product field modifier.
Earlier was a typo
Try with and make changes in your expression
//The expression works for max year to previous year
sum({$<[Product] *= {'A','B','C'}, [Year] = { ">=$(=Max(Year)-1) <=$(=Max(Year))" }>} sales)
Thanks as always!! It worked
Thanks a lot! what I needed as Stefan and you pointed out was the * before *= {'A','B','C'}.
Thanks!