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, 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]
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 | |
16 | |
11 | |
6 | |
5 |
User | Count |
---|---|
29 | |
22 | |
20 | |
13 | |
10 |