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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
skoza12
Frequent Visitor

DAX for dividing 2 calculated fields from 2 different tables

Hi - I am new to Power BI and I am trying to duplicate a report from another application that we use which shows the percent of service calls by catagory in relation to total service calls.  In this example I have 195 total service calls and 7 of them are no problem found.  I would like to present this as a percentage.  Thanks for any help!!!!

skoza12_0-1658333902999.png

 

1 ACCEPTED SOLUTION
7 REPLIES 7
technolog
Super User
Super User

Hi! 

You can create first measure:

All calls = COUNTROWS('Table calls')

and second measure:

Non fault calls = CALCULATE( [All calls] , 'Table calls'[Action code] = "Tested and returned ....**USE YOU TITLE* " )

and result measure:

Percent of fault = DIVIDE ( [Non fault calls] , [All calls] )

HI,

Thank you for a quick response and after a couple of attempts I understand the logic but I am still not outputing the correct data for the first measure. (may be a filtering issue).  I show 204 service calls in the table but when I create the first measure the output is 1480.  

skoza12_0-1658408487609.png

 

You can try 

All calls = COUNT('Table calls'[WONumber])

or

All calls = DISTINCTCOUNT('Table calls'[WONumber])

Let me give this a try - Thanks

I have tried your suggestion and i am almost there.  

My first measure 

skoza12_0-1658754663943.png

Measure 2 

skoza12_1-1658759051486.png

Measure 3

skoza12_2-1658759096395.png

Measrure 1 result = 237

Measure 2 result = 11

Measure 3 result should be 11/237 = 4.64% but is being calcuated as 5.85%

skoza12_3-1658759223999.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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