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
So I have a table like that looks like this:
What I want is to create a measure that get me the most recent value for each ID. So when I view the data in a pivottable it give me:
AA 12
BB 20
CC 15
DD 22
Any idea how I can get this done in DAX/powerpivot?
Hi,
Could you tell me please if your problem is solved? You can mark the right answer to help others if it's convenient for you.
Best Regards!
Dale
Hi,
Following @Greg_Deckler's idea, you need to do these steps.
Measure =
CALCULATE (
MIN ( Table1[Value] ),
FILTER ( Table1, Table1[Attribute] = MAX ( Table1[Attribute] ) )
)
If you only have columns 2007, 2008, 2009, 2010, you still can try a calculated column.
LatestValue =
IF (
ISBLANK ( [2010] ),
IF (
ISBLANK ( [2009] ),
IF ( ISBLANK ( [2008] ), IF ( ISBLANK ( [2007] ), BLANK (), [2007] ), [2008] ),
[2009]
),
[2010]
)
Best Regards!
Dale
You are going to want to unpivot your data on import so that you get your table in a format like:
ID, Year, Value
You'll do this in the Query Editor. At that point, your problem is fairly trivial.
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 |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |