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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Divide two columns using DAX

I'm trying to divide two columns by using DAX. I've always struggled with this functionality in the past and thought I got this but I can't get my head around why it wouldn't work. 

The formula doing a measure: (I tried count function also)

Capturee.JPG

 

Output:

Capture.JPG

It should calculate 3521/41770 = 0.084

 

 

1 ACCEPTED SOLUTION

@Anonymous so as per your screen shot, you need to change data type to decimal number and decimal point to 2 or 3, didn't seems like you did that?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

10 REPLIES 10
parry2k
Super User
Super User

@Anonymous just to clarify, you are adding a measure, correct?

 

Based on screen shot, seems like you are doing count of disputes and transactions, although you said, you tried count, but not worked, what did you get? Same zero?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

yeah @parry2k , it is a measure. 

When I do count: Disputes divided by Transactions = DIVIDE(count('Disputes'[Disputes]), count('Disputes'[Transactions])) - nothing changes.

 

The two columns I'm using in the formula are Transaction and Disputes IDs that I am counting in that table already and then trying to use DAX to get the ratio. 

Capture.JPG

 

@Anonymous did you checked the data type

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I just double checked for both columns.

Capture.JPG

@parry2k 

@Anonymous so as per your screen shot, you need to change data type to decimal number and decimal point to 2 or 3, didn't seems like you did that?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I changed it but it doesn't affect anything @parry2k 

@Anonymous seems to be something I'm missing here, it is simplest thing to do. can you share pbix or sample data.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Sure. Can you share maybe an email I can send it to?

@parry2k 

Anonymous
Not applicable

I did both @parry2k , a calculated column and measure using same formulas:

 

Column formula: Column = DIVIDE(count(Disputes[Disputes]),count(Disputes[Transactions]))

Measure formula: Measure = DIVIDE(count(Disputes[Disputes]),count(Disputes[Transactions]))

 

Output:

Capture.JPG

@Anonymous also can you check the data type of this new measure, make sure it is not a whole number but decimal number with 2 or 3 decimal position, based on screen shot, it looks like it is whole number and in that case you will see 0 and no decimal point, and your calculation is returning decimal point.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.