Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a scatter plot where the X and Y axis values are determined using variable drop downs. (v_X_Axis, v_Y_Axis)
The variable drop downs control all types of graph and I need it to be clear when the combination selected does not result in values for the scatter plot.
I understand that I can use the data handling options in the chart to display a custom error message but don't quite know how best to handle this with variable inputs that have multiple possible combinations?
I suggest adding a table in your data model that keeps all the valid combinations or the X and Y axis values and then use standard filter panels to provide selections for the values. this will prevent the user from selecting invalid combinations. Then there is no error handling required. you can likely use the same variables but use expressions that begin with equal signs so it can calculate the values as needed.
Thanks - could you describe how to create that table and what the expressions would need to look like?
The data itself can probably be done in a simple inline table although there might be some limitations if you are using dollar sign expansion within your measures so you might need to use excel.
Something like this...
Load * Inline [
MeasureName1,Measure1,MeasureName2,Measure2
Thing1,Sum(Thing1),Thing2,Sum(Thing2)
Thing3,Sum(Thing3),Thing4,Sum(Thing4)
Thing1,Sum(Thing1),Thing3,Sum(Thing3)
];
Then you would create a variable that gets the first available expression. You will want to create this variable in the variable editor not the script.
Var1
='=' & Minstring(Measure1)
Var2
='=' & Minstring(Measure2)
Then the expression in the chart measure would look like this
$(Var1)
It is important you understand how equal signs in variables with dollar sign expansion work. In this case the Engine will evaluate the minstring expression and return the formula to calculate the measure in the chart.
I hope this helps.
Chris