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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Victor1986
Helper I
Helper I

Resultado do Municipio

Como faço para trazer o resultado do MUNICÍPIO que teve o maior número TOTAL_ERBS_FALHA na ultima DATA_UPDATE e por UF???

 

Segue link com os dados compartilhados https://easyupload.io/k4h5gi

 

Victor1986_0-1666207905945.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Victor1986 , You can create a Rank and check for Rank =1

 

Rankx(Filter(allselected(Table, Table[UF], Table[Resulto de lina]),[UF] = max([UF])  )  , calculate(Sum(Table[TOTAL_ERBS_FALHA])) , ,desc,dense)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Victor1986 , You can create a Rank and check for Rank =1

 

Rankx(Filter(allselected(Table, Table[UF], Table[Resulto de lina]),[UF] = max([UF])  )  , calculate(Sum(Table[TOTAL_ERBS_FALHA])) , ,desc,dense)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Bom dia @amitchandak 

 

apliquei a formula  abaixo e deu o seguinte erro....

 

Rankx(
Filter(
allselected(
'Historico 7 dias','Historico 7 dias'[UF], 'Historico 7 dias'[MUNICIPIO]),'Historico 7 dias'[UF] = max('Historico 7 dias'[UF]) ) , calculate(Sum('Historico 7 dias'[TOTAL_ERBS_FALHA])) , ,desc,dense)
 
Não são permitidos vários argumentos na função ALLSELECTED quando o primeiro argumento é uma referência de tabela.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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