Forum Discussion
Blake753
4 years agoHelper II
Filter based on Measure Value
I am looking to exclude certain outcomes from a given measure that I have. The measure itself works great, there are just errors within the data load itself which are unavoidable. I am looking to s...
- 4 years ago
Hi there,
The usual way I would handle this is to create a measure that returns the original result under the required conditions, otherwise blank.
A concise way of writing this using your example is:
New Measure = VAR OriginalMeasure = <DAX for Original Measure> RETURN IF ( AND ( OriginalMeasure >= 0, OriginalMeasure <= 3 ), OriginalMeasure -- Defaults to blank if no 3rd argument provided )
OwenAuger
4 years agoSuper User
Hi there,
The usual way I would handle this is to create a measure that returns the original result under the required conditions, otherwise blank.
A concise way of writing this using your example is:
New Measure =
VAR OriginalMeasure =
<DAX for Original Measure>
RETURN
IF (
AND ( OriginalMeasure >= 0, OriginalMeasure <= 3 ),
OriginalMeasure
-- Defaults to blank if no 3rd argument provided
)
Blake753
4 years agoHelper II
Thank you, this works great