How it works...

The SV_PV measure represents the cumulative planned value of the project over time. For the SV_PV measure, we start by simply getting the maximum Finish_Date within the R05_Project table, __MaxDate, and the maximum date within the current context of our line chart visualization, __Date.

Next, since we wish to display the cumulative sum of the planned value for each date we construct a table variable, __Table, by using FILTER to return only those rows within the R05_Project table that have a Start_Date that is less than our current date, __Date. We add two columns to this base table using ADDCOLUMNS. The first column, __TaskDaysDuration, uses DATEDIFF to calculate the total duration in days of each task (row) within the filtered ...

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.