Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Blake753
Helper II
Helper 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 say if the measure produces a result that is greater than 3 or less than 0 it needs to be treated as a blank or no entry.  What is the best way to accomplish this?

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super 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
    )

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super 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
    )

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Thank you, this works great

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors