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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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