Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey everyone,
I am dealing with an issue I cant quite figure out. I have 2 alternate states (State1, State2) and I want to to find the rank with the values of State1, including the aggregated average from State2. See example below:
State 1:
Id | Value |
---|---|
1 | 10 |
2 | 11 |
3 | 12 |
4 | 14 |
5 | 15 |
State 2:
Id | Value |
---|---|
6 | 12 |
7 | 13 |
8 | 14 |
Result:
Id | Value | Rank |
---|---|---|
1 | 10 | 6 |
2 | 11 | 5 |
3 | 12 | 4 |
State 2 | 13 | 3 |
4 | 14 | 2 |
5 | 15 | 1 |
Would you be able to share a qvw sample to see your data? How are you getting different value for the same ids in the two states? Is it based on selections made?
Sunny,
That was just a bad example, the values will be the same. The only thing different between the two states is the selections made.
So, you mean different IDs will be selected?
Yes, selections will be made to filter the IDs for each state. We want the example rank calculation based on those selections.
One last thing... is this in Qlik Sense? I have not used Qlik Sense too much to know how to implement alternate state in Qlik Sense, I might be able to help if you can let me know how to use alternate state in Qlik Sense or I can may be help you with a solution in QlikView and you can transfer it over to Qlik Sense
I can convert it from Qlikview to Qlik Sense.
Check the attached image and qvw sample
This worked great! Thank you! Can you further explain your use of "dim"?
Just using an island table to display two parts.
For expression, when Dim = 1, show the sum of value from State 1, when Dim = 2, show the Avg of value from state 2.
For dimension, when Dim = 1, show ID as the dimension, but when Dim = 2, show some text.