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
ukeasyproj
Helper II
Helper II

is there a way to prevent the top N visual filter from affecting a measure within the visual

Basically I have a visual that I am applying a Top N visual filter on

 

however within this visual, there is a measure that I want calculated that includes all filters (slicers, row) except this Top N visual filter

3 REPLIES 3
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @ukeasyproj,

 

You apply a Top N visual filter on your visual, but you don't want a measure on the visual to obey the Top N visual filter? Could you be more precisely with that?

 

I just feel a little confused.Smiley LOLIt's better to post some sample data with your expected result or share a sample pbix file.

 

Regards

Hi  @v-ljerr-msft  ,

 

My data is set up as follows:

 

Portfolio id |   Project id | Hours Logged| Entry Date

------------------------------------------------------------------

Core           | test proj 1     | 5                    | Jan 1st 2017

------------------------------------------------------------------

Core           | test proj 1    | 10                    | Jan 1st 2017

-------------------------------------------------------------------

Core           | test proj 2   | 10                    | Jan 1st 2017

--------------------------------------------------------------------

Corporate   | test proj 3  | 10                    | Jan 2nd 2017

--------------------------------------------------------------------

Corporate   | test proj 4  | 10                    | Jan 2nd 2017

---------------------------------------------------------------------

 

Basically a given project can only be associated with only one portfolio

There are many projects associated with a portfolio

A project can have many hours logged entries on a given day

 

I am using the topN visual filter on the visual to display the top 3 projects with the most logged hours for a given portfolio as follows:

 

temp2.PNG

 

temp 3.PNG

 

The measure I am trying to create is a percentage calculation:   Total hours logged for that given project/Total hours for that given portfolio

 

total hours logged for that given project is just SUM(Hours Logged)

 

total hours for that given portfolio should be a measure that is filtered by the portfolio and entry date slicer but not the TopN visual filter

 

this is what I originally had but does not work in this case:  

 

Total Hours Logged for portfolio = CALCULATE(SUM(TimeEntries[Hours Logged]) , ALLSELECTED())

 

Percentage = SUM([Hours Logged])/[Total Hours Logged]

 

 

I have uploaded a sample CSV file with some data if it helps:

http://www.filedropper.com/data_69

@v-ljerr-msft was my explanation clear enough? 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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