Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Douglastsouza
Frequent Visitor

Contar campeões

Olá galera, 

 

Estou quebrando a cabeça para algo que eu acredito que seja simples de resolver. Me ajudem.

 

Tenho um dataset com os dados da fórmula 1 e preciso contar quantas vezes um piloto foi campeão, durante todos os anos de competição.

 

Tenho a tabela 'results' com os resultados, com o driverid, raceid, posição na corrida, pontos conquistados... Etc. 

A tabela 'races' possui o ano em que as corridas foram disputadas, então dá pra se filtrar por temporadas através dessa coluna ano.

 

Não consegui uma fórmula DAX para fazer a soma dos pontos, separar por anos e contar quantas vezes cada piloto somou mais pontos, terminando o ano em primeiro lugar (campeão).

 

Obrigado. 

4 REPLIES 4
Ajendra
Resolver I
Resolver I

Hello,

 

I hope this message finds you well!

 

Please share some demo data alongwith the deisred output.

 

Thanks!!

16835759694955062107438870173345.jpg

  • Example

Thanks bro. 

Hay Dear,

 

Here is used data.

 

YearDriver IDMax Points
2023Drivier ID 198
2022Drivier ID 371
2021Drivier ID 932
2020Drivier ID 863
2019Drivier ID 386
2018Drivier ID 656
2017Drivier ID 369
2016Drivier ID 544
2023Drivier ID 925
2022Drivier ID 375
2021Drivier ID 1100
2020Drivier ID 930
2019Drivier ID 675
2023Drivier ID 139
2022Drivier ID 989
2021Drivier ID 756
2020Drivier ID 486
2019Drivier ID 457

 

 

You can try this.

1.JPG

Thank you, but it didn´t work for me.

 

How can I calculte the max of points by each driver in a new table, for example?

I tried to use SUMMARIZE to create a new table, but I dont know how to calculate the Max in this case:

 

SUMMARIZE( results

, results[driverId]

, races[year]

"SumPoints", SUM(results[points])

)

 

If I could calculate the max grouped by driverId and year I can do, then, a distinctcount by driverId to show the campionships of each driver.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.