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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
fdorta
Frequent Visitor

Rank # change when i apply a filter

I create this Rankx data: .Rank CC = CALCULATE(rankx(ALLSELECTED(fConsolidado[Cod. C. Custo Cliente]);[.Total Geral]);all(fConsolidado[SubProduto])) and i got the correct information i was looking for:

 

Capturar.JPG

 

But i need to filter only the TOP 10, when i apply the filter on VISUAL FILTER the rank # change and i am trying to figure out what happens and how can i fix it to mantain the same rank # after i apply the filter:

 

Capturar2.JPG

 

Could you please help me to fix it? I try to research on many articles but did not find how to fix it.

 

Thanks!!

Fdorta

 

 

 

1 ACCEPTED SOLUTION
fdorta
Frequent Visitor

Hi, i found the error, I create a new measure specifing the correct data i need. It Works. Thanks for everyone that could be trying to help me!!!

 

The new measure is:

 

.Total G Rankx = sumx(filter(fConsolidado; [produto] = "Hotéis");fConsolidado[Total Cliente]) + sumx(filter(fConsolidado; [produto] = "PASSAGENS AÉREAS");fConsolidado[Total Cliente]) + sumx(filter(fConsolidado; [produto] = "ALUGUEL DE CARRO");fConsolidado[Total Cliente]) + sumx(filter(fConsolidado; [produto] = "OUTROS SERVIÇOS");fConsolidado[Total Cliente])

 

then I use this measure as an expression of my Rankx:

 

.Rank CC = CALCULATE(rankx(ALLSELECTED(fConsolidado[Cod. C. Custo Cliente]);[.Total G Rankx]);all(fConsolidado[Produto]))

 

It works!

 

Capturar 3.JPG

View solution in original post

1 REPLY 1
fdorta
Frequent Visitor

Hi, i found the error, I create a new measure specifing the correct data i need. It Works. Thanks for everyone that could be trying to help me!!!

 

The new measure is:

 

.Total G Rankx = sumx(filter(fConsolidado; [produto] = "Hotéis");fConsolidado[Total Cliente]) + sumx(filter(fConsolidado; [produto] = "PASSAGENS AÉREAS");fConsolidado[Total Cliente]) + sumx(filter(fConsolidado; [produto] = "ALUGUEL DE CARRO");fConsolidado[Total Cliente]) + sumx(filter(fConsolidado; [produto] = "OUTROS SERVIÇOS");fConsolidado[Total Cliente])

 

then I use this measure as an expression of my Rankx:

 

.Rank CC = CALCULATE(rankx(ALLSELECTED(fConsolidado[Cod. C. Custo Cliente]);[.Total G Rankx]);all(fConsolidado[Produto]))

 

It works!

 

Capturar 3.JPG

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 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.