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
Anonymous
Not applicable

Need help and or condition

i have a condition  to find  Unique ticket ID count  using this filter 

 Status equal to Match  and  Type equal to Invoice  or  Type equal to Certificate

 

When I tried the following, it did NOT work:

 

I'm Using Measure

 

Correct =
CALCULATE(DISTINCTCOUNT ('Finallist'[Ticketno]),
FILTER('Finallist',Finallist[Status]=="Match" && Finallist[Type]=="Invoice" || Finallist[Type]=="Certificate" && MONTH('Finallist'[Date])=MONTH(TODAY())-2)
)
1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

You are probably just missing the paranthesis to group your conditions together:

Correct =
CALCULATE (
    DISTINCTCOUNT ( 'Finallist'[Ticketno] ),
    FILTER (
        'Finallist',
        ( Finallist[Status] == "Match"
            && Finallist[Type] == "Invoice" )
            || (
                Finallist[Type]
                    == "Certificate"
                        && MONTH ( 'Finallist'[Date] )
                            = MONTH ( TODAY () ) - 2
            )
    )
)

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

View solution in original post

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

You are probably just missing the paranthesis to group your conditions together:

Correct =
CALCULATE (
    DISTINCTCOUNT ( 'Finallist'[Ticketno] ),
    FILTER (
        'Finallist',
        ( Finallist[Status] == "Match"
            && Finallist[Type] == "Invoice" )
            || (
                Finallist[Type]
                    == "Certificate"
                        && MONTH ( 'Finallist'[Date] )
                            = MONTH ( TODAY () ) - 2
            )
    )
)

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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