Forum Discussion

JohnLap's avatar
JohnLap
Frequent Visitor
8 years ago
Solved

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 ...
  • JohnLap's avatar
    JohnLap
    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.