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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
DMSJennifer
Helper I
Helper I

Showing dynamic top 25%

Hello,

I'm trying to find the top 25% customers based on peformance. I've figured out how to rank those customers based on that peformance, but if I want to count the amount of customers and multiply that by 0,25 to get a dynamic top selection. It doesn't work like I expect. Can you help me?

 

Top 25% Customer =
Var CustomerRank = RANKX(CROSSJOIN(ALLSELECTED(T_DRN_Jaar[KPGR_KGMMTot]),ALLSELECTED(InvoergegevensTable[IGKP_ID])), CALCULATE(SUM(InvoergegevensTable[NettoCashFlow])),,DESC)
VAR Rank_To_Find = CALCULATE(DISTINCTCOUNT(InvoergegevensTable[IGKP_ID]),InvoergegevensTable)/4
RETURN
CALCULATE(AVERAGE(InvoergegevensTable[NettoCashFlow]), FILTER(InvoergegevensTable, CustomerRank<= Rank_To_Find))

 

Rank_To_Find=CALCULATE(DISTINCTCOUNT(InvoergegevensTable[IGKP_ID]),InvoergegevensTable)/4

This is the formula I use to count the amount of customers. To filter the top 25% based on the ranking, I use the following formula:

FILTER(InvoergegevensTable, CustomerRank<= Rank_To_Find)
If I put a number in stead of "Rank_To_Find", its working like I want it to work, but if I use "Rank_To_Find". It doesn't work.
It seems like the Rank_To_Find doesn't provide some kind of number to compare the CustomerRank.  

Thanks in advance,

Jennifer

2 REPLIES 2
Anonymous
Not applicable

Hi @DMSJennifer 

Can you provide some data for InvoergegevensTable and T_DRN_Jaar table ? From the formula you provided, I don't see any problems at present. It would be best if I can refer to the corresponding data

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello Ailsa,

 

This is some sample data for T_DRN_Jaar table

DMSJennifer_0-1626427665928.png

 

And this is some sample data for InvoergegevensTable:

DMSJennifer_3-1626427978052.png

 

DMSJennifer_2-1626427887016.png

I've covered the sensitive data. I hope this can be usefull. 

 

Kind Regards,

Jennifer 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.