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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Exclude lines based on multiple criteria

Hi,

 

With below as sample data, my goal is to exlude the first line in sample data shown; whereby the multiple criteria for excluding is:

 

Line Type = Actual

Project Type = Funded

Exception = Yes

Cost A + Cost B = 0

 

I did try to modify based on what I can understand from other question threads but I don't think I'm doing it right.

Can someone help to point out what is the mistake in the below measure?

 

CountryProjectManagerCost ACost BLine TypeProject TypeException
Japan1234562123500ActualFundedYes
Japan12345621235500000ProjectionFundedYes
Vietnam4455666677630000060000ProjectionNot FundedYes
South Korea7773337788900ActualFundedNo
Bhutan33556623467700000ActualFundedYes

 

Measure =
VAR Summ =
    SUMMARIZE (
        data,
        data[Country],
        data[Project],
        data[Manager],
        data[Line Type],
        data[Project Type],
 data[Exception],
        "A", [Cost A],
        "B", [Cost B]
    )
RETURN
 
    COUNTROWS (
        FILTER (
            Summ,
            AND( data[Line Type] = "Actual", data[Project Type] = "Funded", data[Exception] = "Yes")
                && OR ( [A] <> 0, [B] <> 0 )
        )
    )

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@gracechong

You can create this measure and assign it to the table visual in the filter pane and set it to 1:

New Measure = 
 IF(
     MAX(data[Line Type]) = "Actual" && 
     MAX(data[Project Type]) = "Funded" && 
     MAX(data[Exception]) = "Yes" && 
     ( MAX(data[Cost A]) <> 0, MAX(data[Cost B] <> 0 )),
     1,
     0
)

________________________

If my answer was helpful, consider Accepting it as the solution to help other members find it

Click the Thumbs-Up icon if you like this answer 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@gracechong

You can create this measure and assign it to the table visual in the filter pane and set it to 1:

New Measure = 
 IF(
     MAX(data[Line Type]) = "Actual" && 
     MAX(data[Project Type]) = "Funded" && 
     MAX(data[Exception]) = "Yes" && 
     ( MAX(data[Cost A]) <> 0, MAX(data[Cost B] <> 0 )),
     1,
     0
)

________________________

If my answer was helpful, consider Accepting it as the solution to help other members find it

Click the Thumbs-Up icon if you like this answer 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors