Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |