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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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