Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text Variable to Set Analysis

Dear All,

I´m trying to pass a variable (vAccountSet) with 3 text members to my chart. But I can´t get it work. Can you help me? I want to get something like this:

Account Amount Driver AmountD Ratio
Energy1370Employee13410.22
Water2104Employee13415.70
Gas2131Employee13415.90


1 Solution

Accepted Solutions
Not applicable
Author

Thanks for your help. The logic is in the dimmension because I need dynamic charts. I attached the solution.

View solution in original post

2 Replies
Not applicable
Author

I would take the logic out of the dimension and instead put it into the expressions as Set Analysis. Set the dimension to Account and then in your expressions use some Set Analysis to limit the accounts. For the first expression:

Sum({<Account = {$(=Replace(vAccountSet, ' or ', ','))}>} Amount)
This is a little more complicated, because you separated your accounts with or in the variable. If you change those to commas, you can probably just use Account = {$(=vAccountSet)}.

You may need to modify some of the other expressions to make them Aggregate functions. Only would work for some. I couldn't come up with the proper expression for the ratio. I'm not exactly sure how that one works. I've attached an example.

Not applicable
Author

Thanks for your help. The logic is in the dimmension because I need dynamic charts. I attached the solution.