The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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)
Output:
It should calculate 3521/41770 = 0.084
Solved! Go to 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.
@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.
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.
@Anonymous did you checked the data type
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 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 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.
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:
@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.
User | Count |
---|---|
62 | |
57 | |
54 | |
51 | |
33 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
43 |