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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Ianbooth
Frequent Visitor

Calculate total of a dax measure

Good evening,

I have a simple dax measure..

In sla = if(sum(date x)=(date y),0,1)

 

This returns a 1 if an item is within sla 

 

I now need a measure to add up all the 1s to collate a total. 

I have tried using sumx of the above measure but the total returns 1

 

Please help. 

 

 

 

 

 

 

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Write a calculated column formula

Test = 1*(Data[Date X]=Data[Date X])

Write this measure

Count = calculate(countrows(Data),Data[Test]=1)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ianbooth ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create a measure.

Total = COUNTROWS(FILTER(ALL('Table'),'Table'[In sla]=1))

(2) Then the result is as follows.

vtangjiemsft_0-1675133100575.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

amitchandak
Super User
Super User

@Ianbooth , based on the column in visual

 

Sumx(Summarize(Fact, item[item], "_1", [In sla]) ,[_1])

 

Add more columns to summarize if needed

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you. What fact doesn't seem to work? And what is the item ?

 

 

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors