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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sccoleman1189
Helper I
Helper I

Calculate column based on multiple filters

Hello,

 

I am trying to create a measure where I calculate # orders  that were completed where the stations are not equal to or doesnt include a specific value.

 

This is what I currently have:

 

Completed = CALCULATE([# Orders],Production[Comp Status]="COMPLETED")----but this includes all stations

 

I want to not include any station(Production[Home Station1]) that includes "CON" in the station name or station name=MELV-CON, DEVL-CON, LIPO-CON

 

Thanks!

 

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@sccoleman1189,

 

Create a measure using DAX formula below:

Completed = 
CALCULATE (
    [#Orders],
    FILTER (
        Production,
        Production[Comp Status] = "COMPLETED"
            && Production[Home Station1] <> "MELV-CON"
            && Production[Home Station1] <> "DEVL-CON"
            && Production[Home Station1] <> "LIPO-CON"
            && IFERROR ( SEARCH ( "CON", Production[Home Station1] ), -1 ) = -1
    )
)

Capture.PNG 

 

You can also refer to my attachment.

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@sccoleman1189,

 

Create a measure using DAX formula below:

Completed = 
CALCULATE (
    [#Orders],
    FILTER (
        Production,
        Production[Comp Status] = "COMPLETED"
            && Production[Home Station1] <> "MELV-CON"
            && Production[Home Station1] <> "DEVL-CON"
            && Production[Home Station1] <> "LIPO-CON"
            && IFERROR ( SEARCH ( "CON", Production[Home Station1] ), -1 ) = -1
    )
)

Capture.PNG 

 

You can also refer to my attachment.

 

Regards,

Jimmy Tao

AlB
Community Champion
Community Champion

Hi @sccoleman1189

Can you clarify this:

 

I want to not include any station(Production[Home Station1]) that includes "CON" in the station name or station name=MELV-CON, DEVL-CON, LIPO-CON

 

Which ones do you want in and which ones not?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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