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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

HIT calculation for DAX calculation

hii 

i am trying to do the hit of sla by considering 3 conditions. the output i need to get after the operation is EXEMPTED but i am not getting it. Previously i did using COUNTIF function in excel.

can someone help me 

 

HIT = CALCULATE(COUNTX(Query1[Priority]= "PLI_NBD"),FILTER(Query1[SLA Status]="FULFILLED") && (Query1[Exempted SLA]= "N"))
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Try this

HIT =
CALCULATE (
    COUNT ( Query1[Priority] ),
    FILTER (
        Query1,
        Query1[SLA Status] = "FULFILLED"
            && Query1[Exempted SLA] = "N"
            && Query1[Priority] = "PLI_NBD"
    )
)

 

or

 

HIT =
COUNTROWS (
    FILTER (
        Query1,
        Query1[Priority] = "PLI_NBD"
            && Query1[SLA Status] = "FULFILLED"
            && Query1[Exempted SLA] = "N"
    )
)

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

5 REPLIES 5
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this approach

 

HIT =
CALCULATE (
COUNTROWS ( Query1 ),
Query1[Priority] = "PLI_NBD",
Query1[SLA Status] = "FULFILLED",
Query1[Exempted SLA] = "N"
)

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hii mohit

i tried using the query u have provided its not showing any error its executed successfully but in the output its showing both exempted and unexempted .

can you help me with this 

Thank you

Hi @Anonymous ,

 

Try this

HIT =
CALCULATE (
    COUNT ( Query1[Priority] ),
    FILTER (
        Query1,
        Query1[SLA Status] = "FULFILLED"
            && Query1[Exempted SLA] = "N"
            && Query1[Priority] = "PLI_NBD"
    )
)

 

or

 

HIT =
COUNTROWS (
    FILTER (
        Query1,
        Query1[Priority] = "PLI_NBD"
            && Query1[SLA Status] = "FULFILLED"
            && Query1[Exempted SLA] = "N"
    )
)

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Greg_Deckler
Community Champion
Community Champion

@Anonymous - See if this helps: https://community.powerbi.com/t5/Community-Blog/CO-CU-Excel-to-DAX-Translation/ba-p/1080018#M2077



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

hiii greg

 

i tried using those operations but i count try to get the output.i am getting an error

 The COUNT function only accepts a column reference as an argument. 

can you plz me to solve this

HIT = COUNTX(COUNT (Query1 [Priority] = "PLI_NBD" ), FILTER( Query1[SLA Status]="FULFILLED" && Query1 [Exempted SLA]= "N"))

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.