How to do it...

To implement this recipe, do the following:

  1. Create the following measure:

Days Sales Outstanding (Month) = 
VAR __Year = MAX('R09_Table'[Year])
VAR __Month = MAX('R09_Table'[Month])
VAR __BeginDate = DATE(__Year , __Month , 1)
VAR __EndDate = EOMONTH(__BeginDate, 0)
VAR __Days = DATEDIFF(__BeginDate, __EndDate, DAY) + 1
VAR __AR =
SUMX(
FILTER(
'R09_Table',
'R09_Table'[Category] = "Accounts Receivable"
),
'R09_Table'[Value]
)
VAR __Credit =
SUMX(
FILTER(
'R09_Table',
'R09_Table'[Category] = "Net Credit Sales"
),
'R09_Table'[Value]
)
RETURN
DIVIDE(__AR, __Credit, 0) * __Days
  1. On a Report page, create a Matrix visualization and add the Month column from the R09_Table table to the Rows area of the visualization, as well as the Days Sales Outstanding (Month) measure, to the Values area of the visualization.