Building an accounting report, part of which is a ratio called "Receivables Turnover". It's calculated as "Sales" / "Trade Receivables". The calculation component of this is straight-forward (using CALCULATE
), but I'm not able to wrap my head around how to filter this by date. Here's why:
The numerator - "Sales" - is filtered for the exact date i.e. "Get me the sum of sales in December 2018". However, the denominator of this calculation is filtered until the date i.e. "Get me the sum of trade receivables until December 2018".
So when I add a filter to the visual, it can be either filtered for the exact date OR filtered to be "on or before". How can I make it so that the numerator and denominator are impacted differently? Is this possible? If not, is there a way to workaround this?
I'm guessing each row of the receivable table contains a positive number for a debit or a negative number for a credit. In that case, the balance at a given point of time would be defined like below.
Receivable Balance =
CALCULATE (
SUM ( Receivable[Amount] ),
REMOVEFILTERS ( 'Calendar' ),
'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
)
For example, if you drill-down the calendar to December 2018, this measure will show the total of all records on or before the end of December 2018.
Then you can use this measure to define the turnover ratio.
Receivables Turnover = DIVIDE ( [Sales], [Receivable Balance] )