I have a formula in PowerBi that I would like to use in PowerPivot.
Only in PowerPivot, selectedvalue is not available and I think I should use if(hasonevalue)?
However, I get the message:
In the Switch function, comparing values of type True/False with values of type Number is not supported. Consider using the Value or Format function to convert one of the values.
How should I modify the formula?
Thanks!
PowerBi formula:
Total IST c =
if(AND([IfFiltered]=true(),[CheckHoofd?]=1),
BLANK(),
SWITCH(TRUE(),
SELECTEDVALUE(Hoofd[Subtotal?])=0,[Total IST a],
SELECTEDVALUE(Hoofd[Subtotal?])=1,[Total IST b]))
PowerPivot formula:
Total IST c:=if(AND([IfFiltered]=true();[CheckHoofd?]=1);
BLANK();
SWITCH(TRUE();
IF(HASONEVALUE(Hoofd[Subtotal?]);0;[Total IST a]);
IF(HASONEVALUE(Hoofd[Subtotal?]);1;[Total IST b])
))
Only in PowerPivot, selectedvalue is not available and I think I should use if(hasonevalue)?
However, I get the message:
In the Switch function, comparing values of type True/False with values of type Number is not supported. Consider using the Value or Format function to convert one of the values.
How should I modify the formula?
Thanks!
PowerBi formula:
Total IST c =
if(AND([IfFiltered]=true(),[CheckHoofd?]=1),
BLANK(),
SWITCH(TRUE(),
SELECTEDVALUE(Hoofd[Subtotal?])=0,[Total IST a],
SELECTEDVALUE(Hoofd[Subtotal?])=1,[Total IST b]))
PowerPivot formula:
Total IST c:=if(AND([IfFiltered]=true();[CheckHoofd?]=1);
BLANK();
SWITCH(TRUE();
IF(HASONEVALUE(Hoofd[Subtotal?]);0;[Total IST a]);
IF(HASONEVALUE(Hoofd[Subtotal?]);1;[Total IST b])
))