Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Show sum of YTD only from Today's date forward

I have order information where some orders have a wanted delivery date in the past and some in the future.

I have created a measure that returns the sum of the late orders, I have also been able to create a measure that only shows the orders that have a future delivery date. I have a dimDate table that I use for my axis.

Where I need help is that I want to show the sum of the late orders only for today's and future dates and not for any past dates. In the end I'm thinking of a stacked bar chart or similar with the late orders and the future orders but the dates start at Today.

I can make it happen by filtering the visual for dates before today, but ideally, I want the measure to return 0 for any date before today and the late order value for today and future dates.

Thank you for any help you can provide.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you for asking. I was able to come up with a measure that gives me the data the way I need.

IF(
	MAX(dimDate[Date]) >= TODAY(),
		CALCULATE(
			sum(fctPOLines[Quantity]),
			dimDate[Date] <= TODAY()
		)
	)

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

I want the measure to return 0 for any date before today and the late order value for today and future dates.

 What have you tried and where are you stuck?

Anonymous
Not applicable

Thank you for asking. I was able to come up with a measure that gives me the data the way I need.

IF(
	MAX(dimDate[Date]) >= TODAY(),
		CALCULATE(
			sum(fctPOLines[Quantity]),
			dimDate[Date] <= TODAY()
		)
	)

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.