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:
User | Count |
---|---|
83 | |
75 | |
71 | |
42 | |
36 |
User | Count |
---|---|
114 | |
56 | |
52 | |
43 | |
42 |