Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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:
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 45 | |
| 35 | |
| 30 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 56 | |
| 38 | |
| 21 | |
| 21 |