There's more...

As denoted by its name, the Days Sales Outstanding (Month) measure only works at the month scale for computing the correct values for days sales outstanding. This formula does not work at the quarter and year scales. To construct a days sales outstanding formula that works at the monthly, quarterly, and yearly scales, do the following:

  1. Create a measure using the following formula:
Days Sales Outstanding =     VAR __Year = MAX('R09_Table'[Year])    VAR __Month = MAX('R09_Table'[Month])    VAR __Quarter = MAX('R09_Table'[Quarter])    VAR __BeginDate =         SWITCH(TRUE(),            ISINSCOPE('R09_Table'[Month]), DATE(__Year , __Month , 1),            ISINSCOPE('R09_Table'[Quarter]),                SWITCH(__Quarter,                    "Q1", DATE(__Year, 1, 1),                    "Q2", DATE(__Year, 4, 1), "Q3", DATE(__Year, ...

Get DAX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.