cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bo-oz Frequent Visitor
Frequent Visitor

Can U also do filter to date calculations?

I'd like to show a graph that shows a YTD value for a measure, that also responds to a date filter. So suppose I have the following values:

 

Month  Sales  YTD

01         10      10

02         30      40

03         25      65

 

 When I would filter my report date filter to only show the from february and onwards, the YTD value should not take the 10 into account, so the YTD value for march should be 55 instead.

 

I already tried using DATESBETWEEN, but that takes the filter context of the graph into account. Is there some way to use the minimum date from the date filter, and the maximum date from the graph?

 

Thanks

 
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Can U also do filter to date calculations?

Hi @bo-oz

Use this measure when "date" column is in a slicer.

YTD = CALCULATE(SUM(Sheet2[sales]),FILTER(ALLSELECTED(Sheet2),[date]<=MAX([date]))) 

3.png

 

Best Regards

Maggie

1 REPLY 1
Community Support Team
Community Support Team

Re: Can U also do filter to date calculations?

Hi @bo-oz

Use this measure when "date" column is in a slicer.

YTD = CALCULATE(SUM(Sheet2[sales]),FILTER(ALLSELECTED(Sheet2),[date]<=MAX([date]))) 

3.png

 

Best Regards

Maggie