I am new to PowerBI and now trying to sum the values of each group at its own latest date by using Measure. I have tried to use "New Table" and Lookupvalue and it's success. However, I would like to use slicer for the date to sum the values as at that date.
Date Group Value
1/8 A 3
1/8 B 4
1/8 C 5
1/8 D 6
2/8 A 7
2/8 B 8
2/8 C 9
4/8 A 10
4/8 B 11
7/8 C 12
7/8 D 13
When the slicer is 7/8, value is A 10, B11, C12, D13, total = 46 When the slicer is 5/8, value is A10, B11, C9, D6, total = 36
I am using the measure as follows,
Measure =
var _maxdate =
CALCULATE(MAX(Sheet1[Date]),
VALUES(Sheet1[Group]))
return
CALCULATE(SELECTEDVALUE(Sheet1[Value]),
Sheet1[Date]=_maxdate)
It can show in visuals the last value of each group, but it can't sum them up. Can anyone help about that? Thanks a lot.