Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Pivot with Empty Column

Dear: I have a query, I have made some crosses with a table that I have, which is called Key Players, which are some of the products that I want to evaluate, it is not the total of the universe, ...
  • v-jingzhang's avatar
    4 years ago

    Hi Syndicate_Admin 

     

    You need to have "Others" in the KEY_PRODUCT column if you want it to be displayed. You could add a new column to data table to group products except for the five listed products into a group "Others", then use this new column as row field in the matrix visual. 

     

    Group column =
    IF (
        'table'[KEY_PRODUCT]
            IN { "ProductA", "ProductB", "ProductC", "ProductD", "ProductE" },
        'table'[KEY_PRODUCT],
        "Others"
    )
    

     

     

    Additionally, if you hope the "Others" group to be dynamic as you would change key products with a slicer or filter, you could refer to the following blog. It has a great solution there. 

    Dynamic Grouping in Power BI using DAX – Some Random Thoughts (sqljason.com)

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.