skip to main content
Power BI
    • What is Power BI
    • Why Power BI
    • Customer stories
    • Data visuals
    • Security
    • Power BI Desktop
    • Power BI Pro
    • Power BI Premium
    • Power BI Mobile
    • Power BI Embedded
    • Power BI Report Server
  • Pricing
    • Azure + Power BI
    • Microsoft 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Overview
    • Find consulting services
    • Partner showcase
    • Find a partner
    • Become a partner
    • Instructor-led training
    • Getting started
      • Overview
      • Online workshops
      • Self-guided learning
      • Webinars
      • Documentation
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Business intelligence topics
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Galleries
    • Community Connections & How-To Videos
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Events
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power BI Community
    • Galleries
    • Quick Measures Gallery
    • Power BI: Show unselected values as Others

    Power BI: Show unselected values as Others

    12-04-2022 08:25 AM - last edited 12-04-2022 09:45 AM

    Super User amitchandak
    Super User
    438 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    amitchandak
    Super User amitchandak
    Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Power BI: Show unselected values as Others

    ‎12-04-2022 08:25 AM

    Problem Statement: In a slicer, we have a set of values. If a value is selected, then show the unselected values as others.

     

    amitchandak_0-1670170931455.jpeg

     

     

    Solution Approach:

    There are two ways in which we can solve this problem: by adding additional dimensions or by using extended dimensions. In this case, we are going to discuss how to use an extended dimension.

    The following is an example of how the test data and the dimension data look like

    amitchandak_1-1670170931404.png

     

    The data model view for a better understanding of the data

    amitchandak_2-1670170931414.png

     

    Here is what the current view looks like when no value has been selected

    amitchandak_3-1670170931440.png

     

    When you select a value, the visual only displays it. Unselected values are not displayed in the visual when you select a value.

    amitchandak_4-1670170931400.png

     

    There is a requirement that unselected values be displayed as a new value labeled as others.

    We are planning to create a new table that has the same values as the current dim table but also has the additional value “Others”, which is an extended dimension that will be joining the dim table in the model.

    amitchandak_5-1670170931401.png

     

    As a result, the model will now look like this:

    amitchandak_6-1670170931443.png

     

    There is now a need to create a measure that will ensure that “Others” has a sum of the values of the unselected values

    The DAX code for the measure that needs to be calculated

    Value + Other2 = 
    var _isfilter = CALCULATE(ISFILTERED(Dim[Key]), ALLSELECTED())
    return
    if(_isfilter,
    if(max('Key'[Key]) ="Others" , CALCULATE(sum(Data[Value]), all(Data)) - CALCULATE(sum(Data[Value]), ALLSELECTED(Data)), sum(Data[Value])),
    sum(Data[Value]))

    In order to demonstrate the functionality of the new measure, I created two visuals. The first one does not interact with the slicer. The second one interacts and makes use of the newly introduced measure.

    As you can see in the second visual, the selected value “A” still contributes 40% of the total, with the rest taken by “Others”.

    amitchandak_7-1670170931465.png

     

     

    I have attached a file for your reference.

     

    There is a video that shows you how to do this step-by-step.

     

    My Medium blog can be found here if you are interested

    Click here to access all my blogs and videos in a jiffy via an exclusive glossary using Power BI. Please like, share, and comment on these blogs. I would appreciate your suggestions for improvement, challenges, and suggestions for topics so that I can explore these in more depth.

    There is a Power BI tutorial series that you can watch on my channel. Make sure you subscribe, like, and share it with your friends.

    Master Power BI
    Expertise in Power BI
    Power BI For Tableau User
    DAX for SQL Users

     

     



    Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
    Formatted Profit and Loss Statement with empty lines
    Power Bi unselected values as Others.pbix
    Labels:
    • Labels:
    • Filters
    • Mathematical
    • Other
    • Totals
    Message 1 of 1
    438 Views
    0
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign in
    • Sign up

    Browse

    • Solutions
    • Partners
    • Consulting Services

    Downloads

    • Power BI Desktop
    • Power BI Mobile
    • Power BI Report Server
    • See all downloads

    Learn

    • Guided learning
    • Documentation
    • Support
    • Community
    • Give feedback
    • Webinars
    • Developers
    • Blog
    • Newsletter

    © 2023 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices