Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Solved! Go to Solution.
Hi there
This is possibly what you are after?
Measure = CALCULATE ( SUM ( 'Table1'[StorageLevelAfterDelivery(kg)] ), FILTER ( 'Table1', 'Table1'[ShiftEndDate] = MAX ( 'Table1'[ShiftEndDate] ) ) )
Hello Gilbert,
Here is an example of what I would like to do :
SiteName | ShiftCode | ShiftEndDate | StorageLevelAfterDelivery(kg) |
A | 23 | 20/07/2018 | 33 600 |
A | 26 | 15/12/2017 | 34 300 |
A | 30 | 08/03/2018 | 34 300 |
A | 52 | 05/04/2018 | 34 300 |
A | 37 | 30/01/2018 | 35 000 |
A | 123 | 16/02/2018 | 35 000 |
B | 45 | 15/12/2017 | 16 800 |
B | 89 | 07/08/2018 | 32 900 |
B | 95 | 15/03/2018 | 33 250 |
B | 75 | 21/03/2018 | 33 250 |
B | 78 | 27/02/2018 | 33 600 |
B | 62 | 29/03/2018 | 33 600 |
C | 54 | 15/12/2017 | 34 300 |
C | 68 | 08/03/2018 | 34 300 |
C | 145 | 05/04/2018 | 34 300 |
C | 96 | 30/01/2018 | 35 000 |
C | 102 | 16/02/2018 | 35 000 |
SiteName | ShiftCode | LatestShiftEndDate | StorageLevelAfterDelivery(kg) |
A | 23 | 20/07/2018 | 33 600 |
B | 89 | 07/08/2018 | 32 900 |
C | 145 | 05/04/2018 | 34 300 |
Thanks by advance
Hi JBG,
Create a measure using DAX as below:
LatestShiftEndDate = CALCULATE(MAX(Table1[ShiftEndDate]), ALLEXCEPT(Table1, Table1[SiteName]))
Regards,
Jimmy Tao
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
Hi there
This is possibly what you are after?
Measure = CALCULATE ( SUM ( 'Table1'[StorageLevelAfterDelivery(kg)] ), FILTER ( 'Table1', 'Table1'[ShiftEndDate] = MAX ( 'Table1'[ShiftEndDate] ) ) )
Hello everyone,
Thanks for your help. After I tried each of your solutions, it worked with the first one and then I filter the table with maxdate = 1.
Thanks a lot.
See you
Jerome