Forum Discussion
Filter based on criteria
Hello everyone,
I have 2 columns in my table, one is category and other is product.
I need to select/filter only required category based on product.
Something like below table,
| Product | Category |
| Juice | watermelon |
| Juice | Pinapple |
| Juice | papaya |
| Juice | Apple |
| soap | Hamam |
| soap | lifebouy |
| soap | cinthol |
| powder | sandal |
| powder | chintoor |
| powder | ponds |
So my required output is:
| Product | Category |
| Juice | watermelon |
| Juice | Pinapple |
| soap | Hamam |
| soap | lifebouy |
| powder | sandal |
So I only required watermelon and pinapple when product = Juice.
Need to filter based on above criteria.
Thanks
could you do it manually?
go to the Power Query Editor pick your table, add Custom column like
= Text.Combine({[Location], "-", [Category]})then filter out all you don't need like in Excel
do not hesitate to give a kudo to useful posts and mark solutions as solution
13 Replies
- az38Community Champion
Hi Krishna1992
whats scenario should be used? is it predefined filter? are you going to use a slicer?
you could try the simpliest way is to filter in visuals or to create a calculated table
Table = FILTER(ALL('Table'); 'Table'[Product]="juice" && ('Table'[Category]="watermelon" || 'Table'[Category]="pinapple ") )do not hesitate to give a kudo to useful posts and mark solutions as solution
- Krishna1992Helper I
Hi az38,
Can I filter these data from query editor itself instead of using DAX. I want data to be filtered before projecting in visuals. If I create DAX will that data be applicable for all visuals?
- az38Community Champion
you could easily filter out suceedeed data in Power Query Editor like in Excel
do not hesitate to give a kudo to useful posts and mark solutions as solution
- adityavighneContinued Contributor
Add filters or Slicer for Product and Category and give multiple selection option.
regards,
aditya
- Krishna1992Helper I
Hi adityavighne ,
Thanks for your response..Is it possible to filter it from data itself, instead of visuals?