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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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)

Share with Power BI Enthusiasts: 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)

Share with Power BI Enthusiasts: 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.