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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Create filter from two columns

Hello everyone

 

Im struggeling with something that, in my head, sounds like a very easy task (but isn't with my pbi skills)

 

To begin with, this is the data structure. I have a sales table, that contains OrderNo, Product, Date, CustomerNo, SalespersonOrder, SalespersonCustomer, amount

 

The thing is, every salesperson has their own costumers wich they are responsable for, but the specific order can be done be another salesperson. 

It is therefore vital, that we can toggle between sale details from "Customer owner" and "Order Owner". 

 

Explained in this example with Ben, Tim and Calir as salespersons.

 

This is the complete table:

image.png

 

 

Lets say, that I choose Ben in my SalespersonName filter.

When adding another filter "1" (SalespersonCustomer) i want to see: 

image.png

 

 

And when still having "Ben" choosed in the first filter, I want to see the following, when choosing "2" (SalespersonOrder)

image.png

 

Hopefully it makes sense! 

 

Thanks in advance

 

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

Hi Lahan10,

 

No complete same solution in power bi but here is a workaround which may work in your senario:

 

Click query editor-> Transfrom-> Click on column [SalespersonCustomer] and [SalespersonOrder]-> Click Unpivot Columns-> Rename [attribute] and [value]

 

Capture.PNG 

 

After applied&close, import a custom visual called hierarchy slicer, drag columns [Customer&Order] and [Name] one by one to the slicer.

 

4.PNG

 

2.PNG3.PNG 

 

Regards,

Jimmy Tao

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi Lahan10,

 

No complete same solution in power bi but here is a workaround which may work in your senario:

 

Click query editor-> Transfrom-> Click on column [SalespersonCustomer] and [SalespersonOrder]-> Click Unpivot Columns-> Rename [attribute] and [value]

 

Capture.PNG 

 

After applied&close, import a custom visual called hierarchy slicer, drag columns [Customer&Order] and [Name] one by one to the slicer.

 

4.PNG

 

2.PNG3.PNG 

 

Regards,

Jimmy Tao

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.