Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an application containing data for 4 years. Year is a field the user can select - but only one year at a time (Always one selected value).
I know how to use set analysis in expressions to show data from "not selected" years... But, in one chart I would like to show all years as dimension. How do I do that?
Thanks in advance
Nils
Like this, for example:
sum({<Year=>} Sales
Having nothing after the equals sign tells it to IGNORE selections in that field for the purpose of that expression. I believe that as long as you return a value for the Year, like the above would, that using Year as your dimension would give you that Year, even if it is excluded by the selections.
Like this, for example:
sum({<Year=>} Sales
Having nothing after the equals sign tells it to IGNORE selections in that field for the purpose of that expression. I believe that as long as you return a value for the Year, like the above would, that using Year as your dimension would give you that Year, even if it is excluded by the selections.
Hi there, you can accomplish this with set analysis, use year as a dimension for the disired chart and use similar expressions to the following:
sum( {$<Year = P({1}) >} Amount)
Hi,
This is correct if I need data from more than one year in EXPRESSION, but I need all years shown as DIMENSION.
Thanks for your quick answer (and to John as well ;-))
Best regards
Nils
nilsGC wrote:but I need all years shown as DIMENSION
Which is exactly what happens if you do what either of us said. See attached.
It works - not completly logical, but it works
Thank you, both 😉
Best regards
Nils
Yeah, I agree. It doesn't really make sense. It seems like we should be doing something with the dimension instead, since that's what we're trying to fix.
Hi Nils, i can't really think on a case where you need a chart with only dimensions and without any aggregation function, what john and I try to say, is that if you use the year as a dimension and you select all the years with set analysis, your chart will display and calculate the expression over all the years in you data model. Perhaps you can be a little more specific on your situation if this does not help you.
Regards
I guessed i typed slower than you guys on my last post. Actually I recommend that you always filter dimension values within set analysis, rather than in the dimension. If you do it with a calculated dimension your ability for sorting will be lost.
Regards
How would you alter this to sum for only the most recent Date period (selected or not)? If you have all years selected but want the sum for only the most recent year?