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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Maaike_zeevalk
Regular Visitor

Measure that shows the max date per order

Hi! 

I'm building a table that shows information about different orders, like this:

Maaike_zeevalk_0-1743072645050.png

In this example I have filtered to 1 order, in reality there's more.

The orders can have several delivery dates. I want to show one row per order, with the max delivery date. The amount ordered and amount delivered should show the total of all deliveries. So in this example amount ordered: 17, amount delivered: 17. 

This is a simple drawing of the data model:

Maaike_zeevalk_2-1743073109910.png

 

I'm using a live connection, so would prefer to solve this using measures.

I am able to make changes to the model if neccesary.

 

1 ACCEPTED SOLUTION
sjoerdvn
Super User
Super User

You should be sharing more information on your model, but let me give you some hints..
If you have the delivery dates in your fact_orderlines then it is simply something like MAX(fact_orderlines[delivery_date]).
If your are linking to the date dimension with a non-date column, using single direction, you will need to crossfilter the dimension and then it will be something like CALCULATE(MAX(dim_date_delivered[date]),CROSSFILTER(dim_date_delivered[id], fact_orderlines[delivery_date_id], BOTH)

View solution in original post

2 REPLIES 2
sjoerdvn
Super User
Super User

You should be sharing more information on your model, but let me give you some hints..
If you have the delivery dates in your fact_orderlines then it is simply something like MAX(fact_orderlines[delivery_date]).
If your are linking to the date dimension with a non-date column, using single direction, you will need to crossfilter the dimension and then it will be something like CALCULATE(MAX(dim_date_delivered[date]),CROSSFILTER(dim_date_delivered[id], fact_orderlines[delivery_date_id], BOTH)

I am indeed linking with a non-date column with single direction. Your suggestion worked perfectly, thanks a lot.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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