cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vilmar
Helper II
Helper II

Ranking em ordem crescente não funciona

Olá

 

No primeiro cenario da imagem abaixo, o rank está em ordem decrescente, porem preciso que fique em ordem crescente. Fiz a alteração de DESC para ASC, mas o resultado ficou errado no segundo cenario. 

 

PBIX aqui 

 

 

Sem título.png

1 ACCEPTED SOLUTION
mahoneypat
Microsoft
Microsoft

Please try this expression instead.

 

Ranq =
VAR thisChamadas =
    MIN( fTabela[ID_Chamadas] )
VAR sameTelefone =
    CALCULATETABLE(
        VALUES( fTabela[ID_Chamadas] ),
        ALL( fTabela ),
        VALUES( fTabela[Telefone] )
    )
VAR result =
    RANKXsameTelefone, fTabela[ID_Chamadas], thisChamadas, asc )
RETURN
    result

 

Pat

mahoneypat_0-1647995585227.png





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Microsoft
Microsoft

Please try this expression instead.

 

Ranq =
VAR thisChamadas =
    MIN( fTabela[ID_Chamadas] )
VAR sameTelefone =
    CALCULATETABLE(
        VALUES( fTabela[ID_Chamadas] ),
        ALL( fTabela ),
        VALUES( fTabela[Telefone] )
    )
VAR result =
    RANKXsameTelefone, fTabela[ID_Chamadas], thisChamadas, asc )
RETURN
    result

 

Pat

mahoneypat_0-1647995585227.png





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors