March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Power BI Genius,
I'm having difficulty creating a DAX measure to retrieve approximate values from the two tables provided below.
Using the average cost of products sold in Table 2, I aim to find the shipment number with the closest unit cost received and the most recent shipment date received (if the unit costs received are the same in multiple shipments) from Table 1.
Does anyone experience in creating something similar like this?
Table 1 | |||
Shipment Number | Shipment Date Received | Product | Unit Cost Received |
1000 | 5/12/2023 | A | 5.83 |
1001 | 1/01/2024 | B | 10.13 |
1002 | 2/03/2024 | C | 18.43 |
1003 | 18/02/2024 | B | 10.54 |
1004 | 17/02/2024 | C | 18.23 |
1005 | 29/02/2024 | A | 5.83 |
1006 | 10/04/2024 | B | 10.45 |
1007 | 15/04/2024 | C | 18.39 |
1008 | 20/05/2024 | A | 5.8 |
Table 2 | |
Product | Average Cost sold |
A | 5.825 |
B | 10.5 |
C | 18.23 |
Result wanted:
Product | Average Cost sold | Approximate Search for Shipment |
A | 5.825 | 1005 |
B | 10.5 | 1003 |
C | 18.23 | 1004 |
Solved! Go to Solution.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
14 | |
11 | |
6 | |
5 |
User | Count |
---|---|
27 | |
23 | |
20 | |
13 | |
10 |