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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pmargari
Advocate II
Advocate II

How to filter more than one column

Hello,
Would like to know if you have any ideas how to solve this challenge :
I can have, per row, more than one product ( A , B or C) purchased by the customer in the same process.
There will be cases where the customer only purchase A or B or C alone , other that will A and C , etc can have multiple combinations per row, to not duplicate records to have A , B and C in separate per row.
It’s possible to create a filter that will be able to filter product A, B and C ? is this possible as below image ?

Appreciate your ideas comments
Regards
Paulo

 


filter.jpg

1 ACCEPTED SOLUTION

Hi @pmargari ,

 

Please try to unpivot the columns.
1. Select ProdutoA, ProdutoB and ProdutoC columns in the Power Query Editor, and then click "Unpivot Columns".

vkkfmsft_0-1645591403684.pngvkkfmsft_1-1645591423980.png

 

2. Add a custom column.

= if [Attribute] = "ProdutoA" then [Amount A] else if [Attribute] = "ProdutoB" then [Amount B] else [Amount C]

vkkfmsft_2-1645591521116.png

 

3. Remove these columns.

 

vkkfmsft_3-1645591572439.pngvkkfmsft_4-1645591586054.pngvkkfmsft_5-1645591635415.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
pmargari
Advocate II
Advocate II

Awesome v-kkf-msft 
thanks a lot for your time and this great help and all the details , really appreciated !
KR
paulo 

PaulDBrown
Community Champion
Community Champion

What does the data table actually look like? My first suggestion would probably be to unpivot the product tables.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi Paul,
Thanks for your reply and suggestion 
Here you have an example of the data :
data_ex.jpg
KR
Paulo

Hi @pmargari ,

 

Please try to unpivot the columns.
1. Select ProdutoA, ProdutoB and ProdutoC columns in the Power Query Editor, and then click "Unpivot Columns".

vkkfmsft_0-1645591403684.pngvkkfmsft_1-1645591423980.png

 

2. Add a custom column.

= if [Attribute] = "ProdutoA" then [Amount A] else if [Attribute] = "ProdutoB" then [Amount B] else [Amount C]

vkkfmsft_2-1645591521116.png

 

3. Remove these columns.

 

vkkfmsft_3-1645591572439.pngvkkfmsft_4-1645591586054.pngvkkfmsft_5-1645591635415.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors