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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I have a measure which tells me the last unitname per eventid.
Here is the measure:
I am looking to convert this into a calculated column so I can make this into a barchart. I want the unit name to be the x axis.
Does anyone have any solutions on how to do this?
Thanks!
Solved! Go to Solution.
@Anonymous , You need a new column like this
var _max = maxx(filter(Table, [Event_idx] =earlier([Event_idx]) ),[ActionDate])
return
maxx(filter(Table, [Event_idx] =earlier([Event_idx]) && [ActionDate] =_max ),[unit Name])
@Anonymous use the same measure expression for the calculated column but add a CALCUATE in the beginning
Column =
CALCULATE (
CALCULATE (
MAX ( 'Crew Actions'[UNITNAME] ),
FILTER (
'Crew Actions',
'Crew Actions'[ACTIONDATE]
= CALCULATE (
MAX ( 'Crew Actions'[ACTIONDATE] ),
ALLEXCEPT ( 'Crew Actions', 'Crew Actions'[EVENT_IDX] )
)
)
)
)
@Anonymous use the same measure expression for the calculated column but add a CALCUATE in the beginning
Column =
CALCULATE (
CALCULATE (
MAX ( 'Crew Actions'[UNITNAME] ),
FILTER (
'Crew Actions',
'Crew Actions'[ACTIONDATE]
= CALCULATE (
MAX ( 'Crew Actions'[ACTIONDATE] ),
ALLEXCEPT ( 'Crew Actions', 'Crew Actions'[EVENT_IDX] )
)
)
)
)
You really are a super user. Thank you for this!
@Anonymous , You need a new column like this
var _max = maxx(filter(Table, [Event_idx] =earlier([Event_idx]) ),[ActionDate])
return
maxx(filter(Table, [Event_idx] =earlier([Event_idx]) && [ActionDate] =_max ),[unit Name])
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 143 | |
| 124 | |
| 101 | |
| 80 | |
| 55 |