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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ynew
Helper I
Helper I

A slicer for a pivot table

Hello All,

I need help with coming up with a solution for my problem as below.

To make my question easy to understand I define a simple version of my real data. I have three columns as below:

Customer name               Products        Order Volume

A                                      DDD               3

B                                      EEE                 5

A                                      FFF                 12

B                                      EEE                 10

B                                      HHH                8

C                                      HHH                6

C                                      HHH                4

A                                      HHH                1

 

In fact, I have multiple customers and multiple products with their order volumes. I need to create a slicer. The slicer with have two options to show if a customer is only one type of product or multiple products. So the slicer needs to have options like "Single type" and "Multiple type".

As you see in the above example only customer "C" has "Single type". So I want to have a slicer so that when I have a column visual which shows the total order volume for customers, I can filter the customer to only see the customers with "Single Order" or "Multiple types".

 

I appreciate your kind suggestions and thank you very much in advance.

 

2 ACCEPTED SOLUTIONS

Hi @Ynew

 

It seems your version of Excel does not support DAX variables

 

Please try this instead

 

=
IF (
    CALCULATE (
        DISTINCTCOUNT ( TableName[Products] ),
        ALLEXCEPT ( TableName, TableName[Customer name] )
    )
        > 1,
    "Multiple Type",
    "Single Type"
)

Regards
Zubair

Please try my custom visuals

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.