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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Get the highest average

Hello, good day.

I have a database, where I have the names of the order (OP), the department that belongs (resp x dep2), the days it carries in that order (EEC Days), and the tons.

I made a calculated column to calculate the average of the EEC Days, by order code and responsible department.

The formula is the sig:

Promed 2&3 = CALCULATE(
AVERAGE('DATA Base FAT2 & FAT3'[Dias CEE]),
ALLEXCEPT('DATA Base FAT2 & FAT3','DATA Base FAT2 & FAT3'[OP],'DATA Base FAT2 & FAT3'[resp x dep 2], 'DATA Base FAT2 & FAT3'[Reduccion Stock],'DATA Base FAT2 & FAT3'[MostrarDia]))
The formula works correctly.
The detail is that, when I put the column to the table, some orders may have two or more responsible and it is displayed like this:
BereniceMtz10_0-1632279298405.png

What I want is that it only shows the average in order to the department that has the highest tonnage, in the case of the photo, of the first order: 366774 would be that only show in Prom dias CEE: 2 for the Premium department. I already tried some things and nothing, hopefully they can help me.

Thank you!!

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

The pbix file you provided is not displayed for the time being, whether it can be updated. I will solve it for you as soon as possible.


Looking forward to your reply.


Best Regards,
Henry

 

TheoC
Super User
Super User

Hi @Syndicate_Admin , if it's in Power BI, you should be able to simply go to the Filter pane, select the specific filter (i.e. Prom Dias CEE: 2) and click on Filter Type = Top N.  From there, select "Top" = 1 and filter by the respective value using Max of Prom Dias CEE: 2, then click "Apply Filter".

 

If the above isn't what you were wanting, please upload a copy of the PBIX.

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thanks for the comment but it did not work for me, since I already have a Top N filter from another section, and Power mentions me I can not have two. I will see if I can upload a copy of the power, it is very heavy

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
Top Kudoed Authors