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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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