The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
Using Summarize, I created a table that has the year, name & point columns.
Solved! Go to Solution.
To achieve this in Power BI using DAX, you can modify your existing SUMMARIZE
function to include a ranking based on the points, and then filter the table to only include the top record per year. Here’s how you can do it:
Table =
VAR SummaryTable = SUMMARIZE(
constructor_results,
races[year],
constructors[name],
"Total Points", SUM(constructor_results[points])
)
VAR RankedTable = ADDCOLUMNS(
SummaryTable,
"Rank", RANKX(FILTER(SummaryTable, [year] = EARLIER([year])), [Total Points], , DESC, Dense)
)
RETURN
FILTER(
RankedTable,
[Rank] = 1
)
Proud to be a Super User!
To achieve this in Power BI using DAX, you can modify your existing SUMMARIZE
function to include a ranking based on the points, and then filter the table to only include the top record per year. Here’s how you can do it:
Table =
VAR SummaryTable = SUMMARIZE(
constructor_results,
races[year],
constructors[name],
"Total Points", SUM(constructor_results[points])
)
VAR RankedTable = ADDCOLUMNS(
SummaryTable,
"Rank", RANKX(FILTER(SummaryTable, [year] = EARLIER([year])), [Total Points], , DESC, Dense)
)
RETURN
FILTER(
RankedTable,
[Rank] = 1
)
Proud to be a Super User!
User | Count |
---|---|
83 | |
83 | |
37 | |
34 | |
32 |
User | Count |
---|---|
92 | |
79 | |
62 | |
53 | |
51 |