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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Problems normalizing Data having a TOP N Filter

Hello everyone, 

I'm having some problems with a measure to count my data without a TOP N filter applied.

 

I'm trying to count the number of active employees with 4 or less weeks working divided in groups by their distance to their work.

This employees have a scoring associated and I want to keep the top 14 of them but also want to know which is the population of each group to normalize my data after.

 

The thing is that I can't get my measure to display the count for each group without the TOP N filter applied.

aguuzdo_0-1655389863332.png

The total value of drivers must be 56 but the sum displayed in the graph is 40.

 

Any idea what I'm doing wrong?

 

This is the measure I'm using to calculate the drivers without the topN filter but with the other filters applied:

 
Employees without filters = CALCULATE(DISTINCTCOUNT(data[id_driver]),ALLEXCEPT(data,data[Distance to hub (groups)],data[STATUS],data[Weeks working]))

 

Here it's the Power BI file:

 

pbi file 

 

Thanks in advance.

 

 

7 REPLIES 7
Anonymous
Not applicable

HI @Anonymous,

Any update on this? Can you please share a pbix or some dummy data that keep the raw data structure? They will help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Ashish_Mathur
Super User
Super User

What exact result are you expecting? On any of the graphs, I do not see any figure of 40 at all.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish, sorry, I was wrong with the number 40 I meant 42 which is the sum of the options in the upper part of the graph:

aguuzdo_0-1655994037494.png

That sum should be 56 and I don't know why it itsn't.

 

I do not understand.  In the card visual at the botton left, there is no filter of Top 14 but in the visual at the top left there is.  Therefore how and why should 56 appear as the total in the visual.  I just do not understand.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Thank you for the pbix file.  However, it is not clear what you are actually trying to achieve.  Dynamic binning?

Anonymous
Not applicable

Hi, I just want to achieve the graph I screenshoted but with the numbers showing the correct data on the top.
The sum of the section on the top should be 56 and not 42.

aguuzdo_1-1655994273945.png


If I remove the Scoring Top N filter I get the correct number. So it must be a problem in my measure.

lbendlin_0-1656014537015.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors