Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a straight table where i have to show sum over a date range. The starting point of date is fixed (4th highest date) but end point variable. (like 7th or 10th highest date) depending on a field called SIT.
So, I store variable as vSIT = SIT
=sum({<W_Period={">=$(=max(W_Period,$(=vSIT))))<$(=max(W_Period,4))"}>}WS_Qty)
My dimension is Country. If I use the above expression , if I hard code then it is taking fine but when i pass variable it is taking maximum value of that field ignoring my country dimension. Please advice.
Country SIT
INDIA 16
INDONESIA 7
JAPAN 6
KOREA 6
MALAYSIA WEST 5
NEW ZEALAND 8
PHILIPPINES 5
TAIWAN 6
THAILAND 6
VIETNAM 7
Message was edited by: Ruchi Bagaria
Maybe like
Market | =sum( Aggr( If( Rank(Period) <= SIT and Rank(Period) > 4, Quantiy), Market,Period)) |
---|---|
1650 | |
INDIA | 500 |
INDONESIA | 1150 |
Set analysis is evaluated once per chart. It will take just one value, like you have just discovered. You might need to use another approach to do this. Can you share a more comprehensive sample to be able to help you better
That's how set analysis as well as dollar sign expansions work, they are evaluated once per chart, not per dimension line:
Thanks for the quick response. Please find the sample attahced. In this example, India total should be 500 and indonesia total should be 1150 but my expressions showing wrong values. please guide.
Ruchi ! !
Maybe like
Market | =sum( Aggr( If( Rank(Period) <= SIT and Rank(Period) > 4, Quantiy), Market,Period)) |
---|---|
1650 | |
INDIA | 500 |
INDONESIA | 1150 |
Thank you so much. I was so fretted about it. Such a neat solution!