Forum Discussion
Divide two columns DAX
- 8 years ago
Hello all,
Thank you for you efforts. I finally found the solution.
What I needed to do was:
- create three measures:
Sale = SUM(Query1[SALES])*100
PlannedSale = SUM(Query1[PLANNED_SALES])
Percentage= DIVIDE([Sale];[PlannedSale])
Only this way worked for me and it is cool. Thank you guys
Hello all,
Thank you for you efforts. I finally found the solution.
What I needed to do was:
- create three measures:
Sale = SUM(Query1[SALES])*100
PlannedSale = SUM(Query1[PLANNED_SALES])
Percentage= DIVIDE([Sale];[PlannedSale])
Only this way worked for me and it is cool. Thank you guys
- Paulomongo7 years agoRegular Visitor
Hi,
I am fairly new to this, so please bear with me.
I have two values from my dataset, both numerics. Drop and Connect, I need to show the Drop as a % of Drop and Connect, so created the below measure.
M_DropRate = VAR Drops = sum(Query2[Drops]) VAR DropsConnects = (sum(Query2[Connects]) + sum(Query2[Drops])) RETURN DIVIDE(Drops,DropsConnects)
When I add the measure to my table, it returns zero, but there are values in DROP and CONNECT. Any ideas??
- ozandikerler7 years agoFrequent Visitor
Power BI gives error when I add a new column and type = IFERROR( ([Hedeflenen]-[Gerceklesen])/[Hedeflenen],0)
"Expression.Error: The name 'IFERROR' wasn't recognized. Make sure it's spelled correctly."
- newpi6 years agoHelper V
Hi,
I'm trying to do a simple division of two numerci field columns but when I write the DAX measure. The columns don't load by itself. Its showing me colored text but there is no dropdown appearing as I type the column name. Both the numeric fields are part of the same table.
- NotMyJob3 years agoHelper III
This syntax did not work for me: Percentage= DIVIDE([Sale];[PlannedSale])
Instead of an " ; " I had to use a comma. I should have read the example....🤣 But for those going quickly with copy and paste, RTFM! I had a headache for about 10 minutes before I caught this.