Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

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?

12 Replies
warfollowmy_ver
Creator III
Creator III
Author

Not a variable, but the name of an alternate state

Clever_Anjos
Employee
Employee

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.

swuehl
MVP
MVP

See also my first answer with a possible workaround