
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dynamic name alter state in set analisys
Hi, people!
For example
=sum( { ['Year_1_' & [Shop] ] } )
as
=sum({[Year_1_Shop1]} sales)
Year_1_Shop1 - it's name alter state
where shop it's field, and shop = shop1,
but shop2 will be =sum({[Year_1_Shop2]} sales)
How do it?
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This kind of thing you can´t do
=sum({[$(='State_spec_'&[Dim1])]}Expression1)
Set analysis are not evaluated per row, it´s evaluated before the aggregation of the object, reducing the record set will be evaluated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use a dolar expansion
=sum({$(=Year_1_Shop' & anothervar)} sales)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
task to glue the name of an alternate state, the dollar is only one choice. Have you checked? 😃

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, didn´t check it, but it works, please check attached

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The expression: =Sum({[$(='AE'&vEstate)]}Expression1)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you expect your expression to consider the current chart dimension, i.e. Shop?
This won't work, since dollar sign expansion as well as set analysis is only evaluated once per chart, not per dimension line.
If this is the case, you would need to branch your expression based on dimension:
If(Shop = 'Shop1',
sum({Year_1_Shop1} sales),
If(Shop= 'Shop2', sum({Year_1_Shop2} sales) )
)
Not sure if this comes close to what you are trying to do. Please detail your requirements and setting / context.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi warfollowmy_verysoon,
You can calculate it on variable, on Set Analysis call variable.
Variable -> ='Year_1_' & MinString([Shop])
Set Analysis -> =sum({$(YourVarName)} Sales)
Or you can do it with Variable with parameter
Variable -> ='Year_1_' &$1
Set Analysis -> =sum({$(YourVarName('Shop2'))} Sales)
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice, good to see that it works

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, but the problem is not the point. The task dynamically generate alternative state the name of the column name is not IF function. I have attached an example of your in my first post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, but no need to IF. On if there is already 😃

- « Previous Replies
-
- 1
- 2
- Next Replies »