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.
smpa01
Community Champion
8 years ago- JohnLap8 years agoFrequent Visitor
I see you recreated the problem to test. THANK YOU for taking the time to do that.However, you only recreated the single line of data for each line in the summarized view. If you had multiple rows behind each of the Line# rows, the formula provides the incorrect result. This is the issue.