Forum Discussion
Rubal
Helper II
7 years agoDAX IF Formula error
Hi, I am getting the below errors on the If Formula. Can anyone please help on how to resolve it? Thank you. Vol(Cases / Suom) = if (t_sales_aggregate[Actual or Forecast]="Forecast", (t...
tarunsingla
Solution Sage
7 years agoTry this:
Vol(Cases / Suom) =
IF (
t_sales_aggregate[Actual or Forecast] = "Forecast",
( t_sales_aggregate[Volume (Cases)] && t_sales_aggregate[Volume (SUOM)] )
* AVERAGE ( t_sales_aggregate[Forecast Growth] ),
FORMAT(( t_sales_aggregate[Volume (Cases)] && t_sales_aggregate[Volume (SUOM)] ), "General Number")
)
This will ensure that the data type of the result if true is the same as data type of the result if false i.e. Decimal Number in your case.
Give it a try.
Regards,
Tarun
Rubal
Helper II
7 years agoHi Tarun,
I have tried your piece of code and still showing me the same error. I just don't know what is going on with this :(