I have created a cumulative measure (Cumulative Actual Hours) to show hours spent on a piece of work over time (Date Entered). Each work has fixed budget (Budget Hours) and I’m using a line chart to show the total budget and whether the time entries are nearing budget or have exceeded it.
I want Budget hours to be shown as a straight line and Cumulative Actual Hours as an increasing line approaching it. (Fig 1).
The Problem: When I filter by Work Name the Cumulative Actual Hours is within certain Date Entered but Budget Hours shows the entire range of Date Entered . (Fig 2) I need the Budget hours line to only extend within the Date Entered in the particular work.
I can achieve this if I create use Both Cross Filter Direction between time and work table (Fig 3). But this will break the chart when there is no Work selected as Budget Hours is now filtered by time and is no longer a straight line (Fig 4).
I have attached sample pbix file.
Is there any supporting measure I can write or any dax changes that I can do to Budget hours to achieve this?
Hi @Suraaj I hope that you are having a great experience using the Support Forum so far. We’ve recently launched the Enterprise DNA Forum User Experience Survey, please feel free to answer it and give your insights on how we can further improve the Support forum. Thanks!
If there are Work Name with budget that has no time entered against it; looks like Budget Hours v2 skips through those as the work ID is not present in time table yet. Is there a way to accommodate this?
Also, I have added a date table and created relationship with Time table. This breaks my cumulative Actual hours measure even though I’m using entered date from time able. Do you know why its doing that?
I’ve placed the Date[Date] on the Axis in your Line Chart
A simple way to control visible dates is by creating a measure that you can use as visual level filter.
Again you need to laverage the Date dimension and instead of ‘Time’[Work ID] IN VALUES( ‘Work’[Work ID] ) you can use ALLSELECTED( ‘Work’[Work ID] ) like below.