Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have these two columns as measures. The work great as individual metrics.
I want to divide these 2. When I set up the following DAX I get "Infinity" as a result in my table.
Solved! Go to Solution.
One thing I don't understand, you said you have 2 measures, so why are you not divinding those 2 using DIVIDE() function :
DIVIDE(measure1, measure2)
If you have 2 calculated columns, then it's different. (Calculated columns are visible in Data Vieaw and are calculating on each lines, measures are not visible in Data View but are listed in Field panel (with a specific icon, see below the black calculator is a measure, and the other one with a grey column, is calculated column). Measure can make a sum of a column for instance.
).
Otherwise I think your trouble might be linked to the context of your table, could you tell us more about the context in which you are are trying to divide the 2.
@Anonymous try this
SignupOpsPercent =
DIVIDE(
CALCULATE(COUNT(CallLogging[CALL_ID]),CallLogging[CALL_TYPE]="signup"),
CALCULATE(COUNT(CallLogging[CALL_ID]),CallLogging[CALL_TYPE2]="Opps"),
0
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
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.
Parry, I tried this and all I get is 0 for every row. The same thing happens with IFERROR - all zeros.
One thing I don't understand, you said you have 2 measures, so why are you not divinding those 2 using DIVIDE() function :
DIVIDE(measure1, measure2)
If you have 2 calculated columns, then it's different. (Calculated columns are visible in Data Vieaw and are calculating on each lines, measures are not visible in Data View but are listed in Field panel (with a specific icon, see below the black calculator is a measure, and the other one with a grey column, is calculated column). Measure can make a sum of a column for instance.
).
Otherwise I think your trouble might be linked to the context of your table, could you tell us more about the context in which you are are trying to divide the 2.
AilleryO, thanks for your help. I discovered that one of my calculated fields was returning NULL. I have resolved and now the DIVIDE calculation works. Thank you!
The 2 fields are calculated just as above :
Could you add to your table the 2 measures to see what's their results in your table ?
Hi @Anonymous ,
Try using IFERROR function to your DAX measure.
That will solve the issue.
=IFERROR( value, value_if_error)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |