Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a visualization(bar chart) that runs off of a field that's values are different expressions. Also I would like the filter pane to allow me to change which expression is being used.
Thank you for the help. I came across the solution of just having the expression $(=calculation)
Hi,
You need to add inline table in the script like
Load* Inline [
Metric
Margin
Cost
Sales
];
then add the below expression in the bar chart as
=If(Metric='Cost', Sum(Cost),if(Metric='Sales', sum(Amount),if(Metric='Margin', sum(Amount)- Sum(Cost)))
and place the formula in else condition if you want to show anything as default without selecting any filter
Thank you for the help. I came across the solution of just having the expression $(=calculation)