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
Anonymous
Not applicable

Slicer with columns

Hi there,

 

I have a raw data with a column that specifies the type of contact made to a client.
The issue is, this type of contact is registered as a binary number, for example: 1.0.0. or 1.0.1. which corresponds to 3 different types of contact. 
Letter - 1.0.0

Email - 0.1.0

Telemarketing - 0.0.1

 

However, the issue is, sometimes there may occur situations where the client would be contacted via 2 or more types of contact, originating in values like 1.1.0, 1.0.1, 0.1.1 or 1.1.1

 

What i've done so far, is separate these values in 3 different columns.

 

My issue is, I want to create a slicer which lets me filter my data by this 3 types of contact, and when i select Letter and Email (being 1.1.0), for example, the data would be filtered accordingly. 
Also, im trying to use "Chiclet" slicers, since they are the standard in our reporting.

Any tips?


Thanks for your time and Help! 🙂

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

First remove the . from your value:

 

Capture.PNG

 

Create a new column to convert binary value to 10 base: 

 

value = 
SUMX (
    GENERATESERIES ( 0, LEN ( 'Table'[type of contact] ) - 1 ),
    VAR c =
        MID ( 'Table'[type of contact], LEN ( 'Table'[type of contact] ) - [value], 1 )
    RETURN
        c * POWER ( 2, [value] )
)

 

Capture1.PNG

 

Create a new table for slicer by entering data:

 

Capture2.PNG

 

Then create a measure for visual level filter:

Measure = IF(SUM(slicer[value])=SUM('Table'[value]),1,0)

Capture3.PNG

 

1.gif

 

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EdYdPHKmeTxEsrMOVJTEHRIBxCP5V5v-ivKAtVpiPu03eA?e=9d9Qx9

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

4 REPLIES 4
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Not very sure about why it doesn't work in your situation without your sample data. It's better that you can show us sample pbix for reference that we can help you better.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

Anonymous
Not applicable

Hi again,

 

Sorry for the late reply. I've managed to gather more complete data from our Database which helped solve the issue.

Unfortunately I can't provide my data due to NDA.

 

Nevertheless, your answer was very helpful and im sure it will help someone looking for the same solution, so i've marked it as Accepted Solution.

 

Thanks and Best Regards 🙂

v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

First remove the . from your value:

 

Capture.PNG

 

Create a new column to convert binary value to 10 base: 

 

value = 
SUMX (
    GENERATESERIES ( 0, LEN ( 'Table'[type of contact] ) - 1 ),
    VAR c =
        MID ( 'Table'[type of contact], LEN ( 'Table'[type of contact] ) - [value], 1 )
    RETURN
        c * POWER ( 2, [value] )
)

 

Capture1.PNG

 

Create a new table for slicer by entering data:

 

Capture2.PNG

 

Then create a measure for visual level filter:

Measure = IF(SUM(slicer[value])=SUM('Table'[value]),1,0)

Capture3.PNG

 

1.gif

 

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EdYdPHKmeTxEsrMOVJTEHRIBxCP5V5v-ivKAtVpiPu03eA?e=9d9Qx9

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

Hi there,

 

First of all, thank you so much for this amazing solution! I've learned alot from what you've done, thank you!


I tried applying this solution to my report, but unfortunately it doesn't work, here's a recording of the output 2.gif

Notice: NIF's refers to the Client identifier (NIF = Fiscal Number). Each client has a unique identifier/NIF, which can be duplicated in the raw data.

 

 

What can I provide you with, to best help figure out a solution for this? 

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.