Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to add multiple if statements to a single chart. 1 works fine but I cant figure out how to add a second successfully without error.
Example:
IF((vDimension) ='FX_Rates_Year',AVG(Exchange_Rate),'')
IF((vDimension) ='FX_Rates_Month',SUM(Exchange_Rate),'')
IF((vDimension) ='FX_Rates_Quarter',AVG(Exchange_Rate),'')
Does anyone know how I would correct this?
Hi @Cameron94 ,
Try like this:
IF((vDimension) ='FX_Rates_Year',AVG(Exchange_Rate),
IF((vDimension) ='FX_Rates_Month',SUM(Exchange_Rate),
IF((vDimension) ='FX_Rates_Quarter',AVG(Exchange_Rate),'')))
Hi @Cameron94 ,
Try like this:
IF((vDimension) ='FX_Rates_Year',AVG(Exchange_Rate),
IF((vDimension) ='FX_Rates_Month',SUM(Exchange_Rate),
IF((vDimension) ='FX_Rates_Quarter',AVG(Exchange_Rate),'')))
Hi
As suggested, the if need to be nested.
Instead of nested ifs, you can try
Pick(Match('$(vDimension)', 'FX_Rates_Year', 'FX_Rates_Month', 'FX_Rates_Quarter'), AVG(Exchange_Rate), SUM(Exchange_Rate), AVG(Exchange_Rate)
)
And modify it accordingly. Hope it will work.
Amazing, thanks so much. Can I ask a question though? Is there a particular reason for this format? As a newbie, the whole spacing out part seems odd.