Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
So I have this table
Type | Qty | Date |
A | 10 | 16-Jan |
A | 20 | 17-Jan |
A | 30 | 18-Jan |
C | 10 | 19-Jan |
C | 20 | 20-Jan |
F | 30 | 21-Jan |
G | 30 | 22-Jan |
The result I want is to create a measure that calculate the QTY but only the latest DATE of the Type.
Example Type A should only get 30 because 1/18 is the latest date of that Type(A).
Type | Measure |
A | 30 |
C | 20 |
F | 30 |
G | 30 |
Total | 110 |
Solved! Go to Solution.
Could you please try following measure?
Measure = CALCULATE(SUM(Test[Qty]),FILTER(Test, Test[Date] = MAX(Test[Date])))
Thanks and Regards,
Sayali
Please mark the question solved when done and consider giving a thumbs up if posts are helpful!!
Proud to be a Super User!
Hi,
PBI file attached.
Hope this helps.
Easy enough,
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
Hi @ChristianDGreat ,
Please follow these steps:
1. Use the following DAX expression to create a calculated column ‘day’.
Day = DAY('Tabelle1'[Date])
2.Use the DAX expression shown to create a measure named ‘ Measure ’
Measure =
VAR _latestDay = MAX('Tabelle1'[Day])
VAR _latestDayQty = CALCULATE(SUM(Tabelle1[Qty]),'Tabelle1'[Day] = _latestDay )
RETURN _latestDayQty
3.Use the DAX expression shown to create a measure named ‘ Measure2 ’
Measure 2 =
SUMX(VALUES(Tabelle1[Type]),[Measure])
4. Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ChristianDGreat ,
Please follow these steps:
1. Use the following DAX expression to create a calculated column ‘day’.
Day = DAY('Tabelle1'[Date])
2.Use the DAX expression shown to create a measure named ‘ Measure ’
Measure =
VAR _latestDay = MAX('Tabelle1'[Day])
VAR _latestDayQty = CALCULATE(SUM(Tabelle1[Qty]),'Tabelle1'[Day] = _latestDay )
RETURN _latestDayQty
3.Use the DAX expression shown to create a measure named ‘ Measure2 ’
Measure 2 =
SUMX(VALUES(Tabelle1[Type]),[Measure])
4. Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Could you please try following measure?
Measure = CALCULATE(SUM(Test[Qty]),FILTER(Test, Test[Date] = MAX(Test[Date])))
Thanks and Regards,
Sayali
Please mark the question solved when done and consider giving a thumbs up if posts are helpful!!
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |