Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am trying to set the background color based on the IF statement. I'm not sure if I can combine multiple conditions within the IF statement or not? Because calculation works fine when I run it separately along with the indicator, it doesn't work while I combine it with the IF clause. Please see the calculation below, and help me with fixing it. I have set up the indicator as a variable.
if (Only({<Goal_Metric={'Computer'}>} [Goal]) > sysvalue >= Sum({< Plan_Quarter ={'$(=MaxString(Plan_Quarter))'},[Plan_Metric]={'Computer'}>} [Plan_Value]), '$(vC_LightIndicator)')
Note: sysvalue is also a calculated field.
I'm trying to calculate if goalvalue > sysvalue >= planvalue then show this background color
Any suggestion is greatly appreciated!
you can't do a three way comparison like you do. You need to spilt them into two, like this.
if (Only({<Goal_Metric={'Computer'}>} [Goal]) > sysvalue AND sysvalue >= Sum({< Plan_Quarter ={'$(=MaxString(Plan_Quarter))'},[Plan_Metric]={'Computer'}>} [Plan_Value]), '$(vC_LightIndicator)')
you can't do a three way comparison like you do. You need to spilt them into two, like this.
if (Only({<Goal_Metric={'Computer'}>} [Goal]) > sysvalue AND sysvalue >= Sum({< Plan_Quarter ={'$(=MaxString(Plan_Quarter))'},[Plan_Metric]={'Computer'}>} [Plan_Value]), '$(vC_LightIndicator)')
Thanks Vegar! It is working fine.
I have another question on the same syntax above as I need to apply the same syntax with multiple variations on the dashboard. I would like to create and capture Quarter as a variable so I can use it multiple times. Also, I'm not sure how can I use it with Sum function in set analysis, for example :
if (Only({<Goal_Metric={'Computer'}>} [Goal]) > sysvalue AND sysvalue >= Sum({< Plan_Quarter ={'$(=MaxString(Plan_Quarter))'},[Plan_Metric]={'Computer'}>} [Plan_Value]), '$(vC_LightIndicator)')
Syntax with Variable: How to use it with Sum function
if (Only({<Goal_Metric={'Computer'}>} [Goal]) > sysvalue AND sysvalue >= Sum({<'$(vPlanQtr)'},[Plan_Metric]={'Computer'}>} [Plan_Value]), '$(vC_LightIndicator)')
Thanks for your help!!