Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table that looks similar to below, with the aim to find similar alternatives to one selection:
Dimension | Value | Stat 1 | Stat 2 |
ABC123 | 5 | 1 | 2 |
DEF456 | 4 | 3 | 4 |
GHI789 | 3 | 7 | 8 |
JKL012 | 2 | 2 | 7 |
So essentially what I would like to do is to create a sheet where you select one "Dimension", and the object displays the alternatives that are within 1 in value.
Example:
If I select "DEF456" I want the visualization to show the rows for ABC123, DEF456 AND GHI789. If I select JKL012 it should display JKL012 and GHI789.
Hi,
What you think about a proposal based on data islands ?
In the load script I created a table not connected with the model
INPUTS:
LOAD * INLINE [
Dimension, Value, Stat 1, Stat 2
ABC123, 5, 1, 2
DEF456, 4, 3, 4
GHI789, 3, 7, 8
JKL012, 2, 2, 7
];
ISLAND:
Load distinct Dimension as selected_dimension,Value as selected_Value resident INPUTS;
And for users, I will display the dimension[Selected_dimension]
And I will display the results I want based on the calculated dimension
=if(Value=selected_Value+1 or Value=selected_Value-1,Dimension)
Outputs:
.
2-
3
Cheers,
Hi,
What you think about a proposal based on data islands ?
In the load script I created a table not connected with the model
INPUTS:
LOAD * INLINE [
Dimension, Value, Stat 1, Stat 2
ABC123, 5, 1, 2
DEF456, 4, 3, 4
GHI789, 3, 7, 8
JKL012, 2, 2, 7
];
ISLAND:
Load distinct Dimension as selected_dimension,Value as selected_Value resident INPUTS;
And for users, I will display the dimension[Selected_dimension]
And I will display the results I want based on the calculated dimension
=if(Value=selected_Value+1 or Value=selected_Value-1,Dimension)
Outputs:
.
2-
3
Cheers,
It worked! I did some small changes to your script. The dimensions can have several rows (one per month), where I wanted to sum the stat columns over all rows, but only see the "latest" values.
Instead of putting an expression in the dimension I created a variable set to Avg(selected_value), and then created a set expression as:
Alt(Avg({<value={">=$(=$(vValueComp)-1)<=$(=$(vValueComp)+1)"},Date={$(vMaxDate)}>} value),0)
The "alt" is there to be able to filter out rows that otherwise would be seen as null when adding measures "Sum(Stat)"
Awesome