Forum Discussion
JohnLap
8 years agoFrequent Visitor
ON ADD COLUMN: DIVIDE() function with two columns yields wrong result?
I am new! I am probably missing something obvious!!! But after 12 hours of trying to figure this out I need help. Newest version Power BI Desktop. Just want to Divide two numeric columns. When I ...
- 8 years ago
Correction: The real solution was a little more complex
Transaction Var % Measure = (DIVIDE(CALCULATE(SUM('Table'[Count])),CALCULATE(SUM('Table'[PriorYear.Count])),0)-1)*100
This actually solves the problem.
Converting to a measure is required and will not work against a Direct Query.
JohnLap
8 years agoFrequent Visitor
No. The formulas work fine at the lowest level of detail record for the source data. In other words, if it is not a summary of the source data then the formula works. If it is summarized, in this example, at the Line # level it does not.
Anonymous
8 years agoNot applicable
Hi JohnLap,
I am having same issue where division is going wrong as my data is also summarized.Can you please share how did u solve this in SQL view.
Thanks..