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
charlotte_emily
New Member

Filtering visually but not data

Hello,

 

I have a report which has a large table showing weekly %'s by tranport type.

I am wanting to add a slicer filter so that we can look at each type individually and not have to scroll through, but when filtering, the visual is changing the data. is there a way i can stop this? 

 

i have added the screenshot to show the highlighted column is one type, and correct data, and when i filter it, i am shown the second screenshot.

I am caluclating the % using the "show value as" and "percent of column total" of a measure counting the number of orders. 

 

charlotte_emily_2-1736160476586.png

 

 

charlotte_emily_1-1736160377293.png

 

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @charlotte_emily 

 

Create a separate dimension table for your index column or whatever the column name of those numbers are.

danextian_0-1736161450701.png

 

Relate that to your fact table with a one-to-many relationship.

danextian_1-1736161482608.png

Create this measure:

Percent to All Index =
DIVIDE (
    SUM ( Data[Value] ),
    -- Numerator: Calculates the total of the [Value] column in the current filter context.
    CALCULATE (
        SUM ( Data[Value] ),
        -- Denominator: Calculates the total of the [Value] column, 
        -- but overrides the current filter context as defined below.
        REMOVEFILTERS ( 'Index' ) -- Removes any filters applied to the 'Index' table or column(s). 
        -- This ensures that the denominator represents the grand total of [Value] across all 'Index' groups.
    )
)

Use that measure and the Index column from the dimension table in your visual

danextian_2-1736161588023.png

danextian_3-1736161609756.png

Please see the attached sample pbix





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Your solution is so great danextian , SamWiseOwl and rohit1991 

Hi, @charlotte_emily 

I wish you all the best. Previously Super user and community users have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.

 

 

Best Regards

Jianpeng Li

danextian
Super User
Super User

Hi @charlotte_emily 

 

Create a separate dimension table for your index column or whatever the column name of those numbers are.

danextian_0-1736161450701.png

 

Relate that to your fact table with a one-to-many relationship.

danextian_1-1736161482608.png

Create this measure:

Percent to All Index =
DIVIDE (
    SUM ( Data[Value] ),
    -- Numerator: Calculates the total of the [Value] column in the current filter context.
    CALCULATE (
        SUM ( Data[Value] ),
        -- Denominator: Calculates the total of the [Value] column, 
        -- but overrides the current filter context as defined below.
        REMOVEFILTERS ( 'Index' ) -- Removes any filters applied to the 'Index' table or column(s). 
        -- This ensures that the denominator represents the grand total of [Value] across all 'Index' groups.
    )
)

Use that measure and the Index column from the dimension table in your visual

danextian_2-1736161588023.png

danextian_3-1736161609756.png

Please see the attached sample pbix





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
rohit1991
Super User
Super User

The issue you’re experiencing occurs because applying a slicer filter recalculates the percentages based on the filtered data, which is standard behavior for the "Show Value As" percentages in Power BI or similar tools. To maintain the original percentage calculation while filtering:

  1. Create a Measure for Total Orders: Create a measure that calculates the total number of orders without considering the filter. For example:  TotalOrders = CALCULATE(COUNT(Table[Orders]), ALL(Table))

  2. Create a Percentage Measure: Create a measure for the percentage calculation that references the unfiltered total: Percentage = COUNT(Table[Orders]) / [TotalOrders]

    1. Update Visuals: Use the new Percentage measure in your table or chart.

    This approach ensures the percentages remain based on the entire dataset, regardless of slicer filters applied. Let me know if you need help with implementation!


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
SamWiseOwl
Super User
Super User

Hi @charlotte_emily 

 

You can create a measure that ignores the external slicer.

 

% of all items =

Divide( --handles divide by 0 cases

           Sum(table1[column1]) --Your original unaggregated column

           ,Calculate(  Sum(table1[column1]), All(table1[column2])) --remove the filter on the slicer column
)

 

Calculate lets you change, add or remove filters.

The all function is telling PBI to remove the filter on the column which is being filtered.

Meaning the bottom calculation will return the unfiltered total.

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.