0
votes

Let's say I have a table of projects/programs/subscriptions/etc, it doesn't really matter as long as there is a price or cost per some amount of time. My table includes at least the following columns:

[ProjectName]

[StartDate]

[EndDate]

[CostPerDay]

I'm trying to allow the user to choose another date (slicer I assume?) and display the cost of each and all projects up to that date. Is this possible?


Edit: After the first responses I realize the original question was very poorly worded. Sorry about that. I've reworded it and I'll explain more here:

I am not trying to filter the programs by end date. I'm trying to sum a cost up until the end date OR slicer date, whichever is earlier.

Here's a short example table:

Example Table

So we can also think of it as a Gantt chart like this:

Gantt chart

Now imagine sliding a vertical line along that chart. I want to see the total cost up to that date.

I'm sure it will have to do with counting days between start date and the slicer date, then multiplying by cost. But how do we not include days after the end date of each project? Or it may be easier to do a range slicer with a min and max date, but again not counting days before or after each project.

To word it differently: can I input a date range, count the days that each project has in common with that range, and (the simple part) multiply days by cost?

1
If all you want is projets that End before the selection just connect a date table to EndDate and set your filter to before. If you want between startdate and enddate you will need a bit of DAX. Supply some sample data and expected outcome, and what have you tried?mxix

1 Answers

0
votes

It looks like what you need is a table visualization with a slicer for End date. Once the table and slicer are created, you can click on the small down facing arrow in the slicer and choose "Before". If you want both start date and end date in the equation, then you would have to add one more slicer for "Start date". If this is not what you are looking for kindly provide additional details so that we can help you out.