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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
alexSPY
Helper II
Helper II

Find a value based on a measure (PO ship date with shipping method)

I have a table loaded from SQL server using import into Power Bi. This table contains all of our historical and open PO information.

 

I've created measures to calculate what the next incoming PO date is for each item:

 

NEXT PO DATE = CALCULATE(
MIN(PURCHASING[PROMISE DATE]),
IF(
PURCHASING[PROMISE DATE] >= DATE(YEAR(NOW()),MONTH(NOW()),DAY(NOW())),
1,
BLANK()
)
)

 

I've also created a mesure to calculate how much is on the next incoming PO:

 

NEXT PO QTY = CALCULATE(
SUM('ON ORDER BY DATE'[QTY ON ORDER]),
FIRSTDATE('ON ORDER BY DATE'[PROMISE DATE])
)

 

The query loads in a column which shoes the shipping method for each PO. What I can't figure out how to do is how to show a, for each item, all 3 pieces: What the next PO date is, the quantity on that PO, and how it arrives. The first two are solved with the above measures, but I can't figure out how to show the shipping method for that PO. I can't simply insert the "shipping method" column from the query since there are many shipping methods depending on the PO. Doing so returns this:

ShipMethods.JPG

 

As you can see from this picture, the correct shipping method for the next PO is "Routing Guide", but I end up seeing all of the potential options.

 

Any ideas?

1 ACCEPTED SOLUTION
alexSPY
Helper II
Helper II

I found a solution:

 

Because I had already created a calculated table, defined as follows:

 

ON ORDER BY DATE = CALCULATETABLE(
Purchasing,
SUMMARIZECOLUMNS(Purchasing[PROMISE DATE]),
Purchasing[PROMISE DATE] >= TODAY()
)

 

I was able to use this, and when I add the column "Shipping Method", use the Power Bi selection of "first" since this calcualated table only brings in PO's that are greater than the current date. So the "first" in the column would be for the most recent PO.

View solution in original post

1 REPLY 1
alexSPY
Helper II
Helper II

I found a solution:

 

Because I had already created a calculated table, defined as follows:

 

ON ORDER BY DATE = CALCULATETABLE(
Purchasing,
SUMMARIZECOLUMNS(Purchasing[PROMISE DATE]),
Purchasing[PROMISE DATE] >= TODAY()
)

 

I was able to use this, and when I add the column "Shipping Method", use the Power Bi selection of "first" since this calcualated table only brings in PO's that are greater than the current date. So the "first" in the column would be for the most recent PO.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.