Forum Discussion
Filter based on criteria
- 6 years ago
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
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
I cannot filter in power query because they will not make sense. I will change things up slightly,
If we add location column to it. Ex.
| Location | Product | Category |
| India | Juice | watermelon |
| India | Juice | Pinapple |
| India | soap | Hamam |
| India | soap | lifebouy |
| India | powder | sandal |
| US | Juice | Pinapple |
| US | Juice | papaya |
| US | soap | lifebouy |
| US | soap | cinthol |
| US | powder | sandal |
| US | powder | chintoor |
If I filter category, other location will also filter out, can I do anything in this in query editor. or I need to do DAX?
Thanks
- Krishna19926 years agoHelper I
Hi az38 ,
I will remodify the question,
Please try if you could try to understand,
Location Category India watermelon India Pinapple India papaya India Apple India Apple US watermelon US Pinapple US papaya US Apple US Vinegar US Papaya I need to select category based on location, Eg. India watermelon and pinapple, and for US I only need apple, vinegar.This is requirement. If you could try to through me a solution. Thanks in advance.
- az386 years agoCommunity Champion
lets start step-by-step.
whats your data source? how it looks like? Table "Lcation-Category" is the only data source? How can we define that for India it should be only watermelon and pinapple?
do not hesitate to give a kudo to useful posts and mark solutions as solution
- Krishna19926 years agoHelper I
Hi az38 ,
I need to filter category on different location. Which means Every location may have same category or different category.
But I need to select required category for specific location. Ex. if it is India I need to select certain category, if it is US it need to select certain category.
Eg.
India - I need watermelon, apple
US - I need vinegar, watermelon, pinapple.
Likewise I need to multiple location. Only DAX is possible or can I do in query editor. Thanks for your response.