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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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