0
votes

I am coming across an issue while dividing two measures "Spend running total" and "Total Invoiced Amount", which are calculated as :

Spend running total (numerator)= VAR InvoicedAmount = CALCULATE ( SUM ( [Invoiced Amount]) ) RETURN CALCULATE ( SUM ( [Invoiced Amount] ), FILTER ( ALL ( [Vendor name] ), CALCULATE ( SUM ( [Invoiced Amount] ) >= InvoicedAmount ) ) )

Total Invoiced Amount(Denominator) = SUM([Invoiced Amount])

The division is not evaluated and I don't see a line for that in the chart, but when I replace it with the hard coded value, it evaluates and can be seen in the chart.

Am I missing something? Would really appreciate any help.

1
Post your "division" measure formula. - Mike Honey
Mike, thanks for responding. I was able to resolve the issue by creating a quick measure that creating "Totals" for category; in this case for "Vendor Name" which resulted in aggregating the "Invoice Amount" field by Vendor Name. - IlaChauhanau

1 Answers

0
votes

Thanks for responding. I was able to resolve the issue By creating a quick measure by creating "Totals" for category in this case for "Vendor Name" which resulted in aggregating the "Invoice Amount" field by Vendor Name. Here's the complete formula : % Running Total = [Spend running Total]/[Invoiced Amount total for Vendor name], where Spend running Total = VAR InvoicedAmount = CALCULATE ( SUM ( [Invoiced Amount]) ) RETURN CALCULATE ( SUM ( [Invoiced Amount] ), FILTER ( ALL ( [Vendor name] ), CALCULATE ( SUM ( [Invoiced Amount] ) >= InvoicedAmount ) ) )

Invoiced Amount total for Vendor name = CALCULATE( SUM([Invoiced Amount]), ALL([Vendor name]) )

This solved the issue of division for me.