Forum Discussion
s45kougo
6 years agoHelper I
Filtering within a VALUES function based on another field
Hi all - hoping someone can help me with this (my first plea for help!) I'll give an anonymised example of what I need to do - the real version is obviously a bit more complicated! I have a tabl...
- 6 years ago
Another approach is to use CALCULATETABLE(VALUES(Table[Fruit]), Table[Colour] = "green").
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
DataZoe
6 years agoMicrosoft Employee
s45kougo Not sure I understand the scenario here, but my first thought was this:
Slicer =
var fruit = CROSSJOIN(ROW("Type","Fruit"), filter(VALUES('Table'[fruit]),'Table'[Colour]="Green"))
var vegetable = CROSSJOIN(ROW("Type","Vegetable"), VALUES('Table'[Vegetable]))
return UNION(fruit,vegetable)