Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
73 | |
55 | |
43 | |
38 |
User | Count |
---|---|
98 | |
65 | |
54 | |
48 | |
45 |