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! It's time to submit your entry. Live now!
Hi all, I'm having trouble coding this column...
my data behaves like this:
and I want to add a new column that will return the Event with the max date, per Subject
like this:
I can't go into the details, the data is proprietary... This is a mock-up of only what I need, and only 3 subjects.
Solved! Go to Solution.
Hi, @Anonymous
I tried to reproduce the problem.
I used the dax below
Max Event =
VAR CurrentSubject = Table1[Subject]
VAR MaxDate =
CALCULATE(
MAX(Table1[Event Date]),
FILTER(
Table1,
Table1[Subject] = CurrentSubject
)
)
RETURN
CALCULATE(
MAX(Table1[Event]),
FILTER(
Table1,
Table1[Subject] = CurrentSubject && Table1[Event Date] = MaxDate
)
)
result:
Proud to be a Super User!
Hi, @Anonymous
I tried to reproduce the problem.
I used the dax below
Max Event =
VAR CurrentSubject = Table1[Subject]
VAR MaxDate =
CALCULATE(
MAX(Table1[Event Date]),
FILTER(
Table1,
Table1[Subject] = CurrentSubject
)
)
RETURN
CALCULATE(
MAX(Table1[Event]),
FILTER(
Table1,
Table1[Subject] = CurrentSubject && Table1[Event Date] = MaxDate
)
)
result:
Proud to be a Super User!
perfection, thank you!
Hi,
you could try something like this:
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 46 | |
| 30 | |
| 24 | |
| 23 |
| User | Count |
|---|---|
| 146 | |
| 108 | |
| 64 | |
| 38 | |
| 31 |