Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have the following table:
I need to create an individual measure for each category Table[Name] getting the Table[Value] for the Lastdate of the category.
My last try was the below, but no success:
Last Value of A =
var _name = "A"
var _lastdate = LASTDATE(MyTable[Datetime])
var _maxvalue = CALCULATE(
MAX(MyTable[Value]),
FILTER(
all(MyTable),
MyTable[Datetime] = _lastdate && MyTable[Name] = _name
)
)
return _maxvalue
This table is supposed to be big because it's receiving streaming data and keeping the history.
How to create a measure that give me the last value of A considering the performance for calculation on a streaming table ?
Best Regards.
Kleyson Rios.
Solved! Go to Solution.
Hi @kleysonr
if you are slicing by name in your visual then delete the name filter part
Last Value of A =
VAR _name = "A"
VAR _lastRecod =
TOPN ( 1, FILTER ( MyTable, MyTable[Name] = _name ), MyTable[Datetime] )
VAR _maxvalue =
SUMX ( _lastRecod, MyTable[Value] )
RETURN
_maxvalue
Hi @kleysonr
if you are slicing by name in your visual then delete the name filter part
Last Value of A =
VAR _name = "A"
VAR _lastRecod =
TOPN ( 1, FILTER ( MyTable, MyTable[Name] = _name ), MyTable[Datetime] )
VAR _maxvalue =
SUMX ( _lastRecod, MyTable[Value] )
RETURN
_maxvalue
Thanks.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 9 | |
| 8 | |
| 7 |