The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, what I am trying to do is to get the maximum date by Material. I'm using datasets, tables with attributes, and tables with measures.
DAX:
EVALUATE
SUMMARIZECOLUMNS (
'Material'[MAT WRIN0],
'Delivery Date'[DLVD Date],
'Purchase Order'[PO Number],
FILTER (
VALUES ( 'Distributor'[DIST Country] ),
( 'Distributor'[DIST Country] = "Romania" )
),
FILTER (
VALUES ( 'Purchase Order'[PO Status Description] ),
( 'Purchase Order'[PO Status Description] = "Purchase order APPROVED" )
),
"Purchase Order To Be Received Quantity", [Purchase Order To Be Received Quantity]
)
ORDER BY 'Delivery Date'[DLVD Date]
Here is the data extract, and the final result should be like WRIN0 and Max DLVD Date (just one line per WRIN0).
Solved! Go to Solution.
Hi @Anonymous
please use
EVALUATE
FILTER (
SUMMARIZECOLUMNS (
'Material'[MAT WRIN0],
'Delivery Date'[DLVD Date],
'Purchase Order'[PO Number],
FILTER (
VALUES ( 'Distributor'[DIST Country] ),
( 'Distributor'[DIST Country] = "Romania" )
),
FILTER (
VALUES ( 'Purchase Order'[PO Status Description] ),
( 'Purchase Order'[PO Status Description] = "Purchase order APPROVED" )
),
"Purchase Order To Be Received Quantity", [Purchase Order To Be Received Quantity]
),
'Delivery Date'[DLVD Date]
= CALCULATE (
MAX ( 'Delivery Date'[DLVD Date] ),
ALLEXCEPT ( 'Material', 'Material'[MAT WRIN0] )
)
)
ORDER BY 'Delivery Date'[DLVD Date]
Hi @Anonymous
please use
EVALUATE
FILTER (
SUMMARIZECOLUMNS (
'Material'[MAT WRIN0],
'Delivery Date'[DLVD Date],
'Purchase Order'[PO Number],
FILTER (
VALUES ( 'Distributor'[DIST Country] ),
( 'Distributor'[DIST Country] = "Romania" )
),
FILTER (
VALUES ( 'Purchase Order'[PO Status Description] ),
( 'Purchase Order'[PO Status Description] = "Purchase order APPROVED" )
),
"Purchase Order To Be Received Quantity", [Purchase Order To Be Received Quantity]
),
'Delivery Date'[DLVD Date]
= CALCULATE (
MAX ( 'Delivery Date'[DLVD Date] ),
ALLEXCEPT ( 'Material', 'Material'[MAT WRIN0] )
)
)
ORDER BY 'Delivery Date'[DLVD Date]
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
20 | |
19 | |
18 | |
18 | |
14 |
User | Count |
---|---|
38 | |
35 | |
23 | |
20 | |
17 |