Forum Discussion
Measure with IF OR
- 4 years ago
Hi, Anonymous ;
Try to create a measure.
Result = VAR a = SUM ( Sales[SalesAmt] ) RETURN IF ( MAX ( Sales[Region] ) IN { "FPT", "BRT", "ZXT" } || LEFT ( MAX ( Sales[Region] ), 3 ) = "FRT", a, a - SUM ( Sales[Margin] ) )If not right, can you share a simple example so that we can better test it?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous ;
Try to create a measure.
Result =
VAR a =
SUM ( Sales[SalesAmt] )
RETURN
IF (
MAX ( Sales[Region] )
IN { "FPT", "BRT", "ZXT" }
|| LEFT ( MAX ( Sales[Region] ), 3 ) = "FRT",
a,
a - SUM ( Sales[Margin] )
)
If not right, can you share a simple example so that we can better test it?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous ;
You could use ISINSCOPE or HASEONEVALUE function,about some links as follow:
https://docs.microsoft.com/en-us/dax/hasonevalue-function-dax
Or you could provide a simple file.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.