Forum Discussion
JBG
8 years agoRegular Visitor
highest value by category
Hello everyone!! I am trying to extract the data from the latest date record (ex: for each customer last delivery date & delivered quantitiy) I am able to select the last date but I get...
- 8 years ago
Hi there
This is possibly what you are after?
Measure = CALCULATE ( SUM ( 'Table1'[StorageLevelAfterDelivery(kg)] ), FILTER ( 'Table1', 'Table1'[ShiftEndDate] = MAX ( 'Table1'[ShiftEndDate] ) ) )
v-yuta-msft
8 years agoCommunity Support
Hi JBG,
Create a measure using DAX as below:
LatestShiftEndDate = CALCULATE(MAX(Table1[ShiftEndDate]), ALLEXCEPT(Table1, Table1[SiteName]))
Regards,
Jimmy Tao
JBG
8 years agoRegular Visitor
Hi Jimmy,
Thanks for your answer. Unfortunatley, I still have the same problem which is it doesn't filter one data (the latest) per site name. When I wwant to know quantities per site at the latest date, I still have several datas per site... If you have another advice... Thanks
- GilbertQ8 years agoSuper User
Hi there
This is possibly what you are after?
Measure = CALCULATE ( SUM ( 'Table1'[StorageLevelAfterDelivery(kg)] ), FILTER ( 'Table1', 'Table1'[ShiftEndDate] = MAX ( 'Table1'[ShiftEndDate] ) ) )