Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have this example please
Expected output : a Measure that returns 1 for a = 3 / b = 6
These are verions and I need to specify which one is the last version
I tried this, the measure isn't even working because it couldn't find `_LastChange`
Best Score 2 =
VAR _LastChange = SUMMARIZECOLUMNS('Table'[Column1],
"Maxd", Max('Table'[Column2])
)
VAR _group = VALUES('Table'[Column1])
VAR _max = _LastChange[Maxd]
Return
VAR MaxValue =
CALCULATE ( MAX ( 'Table'[Column2] ), REMOVEFILTERS ( 'Table' ) )
RETURN
IF ( SELECTEDVALUE ( 'Table'[Column1] ) = _group,
IF(Filter('Table', 'Table'[Column1] = _group) = _max , 1, 0 )
)
Thank you in advance
Solved! Go to Solution.
Hi @lazurens2
do you want to flag the last record of each value of column1? If so please try
Best Score 2 =
VAR CurrentValue =
SELECTEDVALUE ( 'Table'[Column2] )
VAR MaxValue =
CALCULATE ( MAX ( 'Table'[Column2] ), ALLEXCEPT ( 'Table', 'Table'[Column1] ) )
RETURN
IF ( CurrentValue = MaxValue, 1 )
Hi @lazurens2
do you want to flag the last record of each value of column1? If so please try
Best Score 2 =
VAR CurrentValue =
SELECTEDVALUE ( 'Table'[Column2] )
VAR MaxValue =
CALCULATE ( MAX ( 'Table'[Column2] ), ALLEXCEPT ( 'Table', 'Table'[Column1] ) )
RETURN
IF ( CurrentValue = MaxValue, 1 )
Thank you very much, it's working !
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 21 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |