Prevent YTD, QTD, MTD Results Projecting Forward - DAX Techniques

Dear Sam, how to prevent this same problem with Cumulative Sales Pattern when comparing with Cumulative Sales LY and Cumulative Sales 2LY ?

I am filtering the Year of 2008 and my visuals are showing numbers beyond March (Actual Month in my report)

Ps. At this moment I am using the following measure and
Cumulative Sales Selected = Cumulative Sales (Selected) =
CALCULATE(
[Total Sales] ;
FILTER(
ALLSELECTED( Dates);
Dates[Date] <= MAX( Dates[Date])
)
)

Cumulative Sales LY = 
CALCULATE( 
	[Sales LY] ; 
	FILTER(
		ALLSELECTED( Dates );
		Dates[Date] <= MAX( Dates[Date])
	)
)

How to solve this problem?

Best Regards

Can you post some images, so I know exactly what you are looking at?

Here’s a video that may help

Sam, I watched the video and now my measure and visuals are working nicely as you can see at the image.
When possible, please show/share to us (members) this same solution using variables.
It would be great!!
Best Regards.

In this case I don’t think you really need to use variables, it works fine as is and reads pretty well.

I would only use them to make you formulas flow better.

I think case, I don’t think it would make much difference

Glad it’s working

1 Like