Forum Discussion
Complex Matching varying slicer interactions
- Anonymous2 years ago
Hi Redacted_VAR
Thanks for the reply from MFelix .
Redacted_VAR , please try the following method.
Use the fields in Table2 as Salesperson Slicer
Create a new table as Drink slicer
Drinktable = VALUES(Table1[Drink])no relationship between these tables
Create two measures as follow
Has Bought Drink = VAR _Drink = CALCULATE(MAX(Table1[Drink]), FILTER(Table1, [first Customer Name] = SELECTEDVALUE(Table2[Customer Name]))) RETURN IF(_Drink = SELECTEDVALUE(Drinktable[Drink]), "Yes", "No")Is In right Industry = IF(MAX(Table2[Customer Industry]) = [TopIndustry], "Yes", "No")Output:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try the following:
TopIndustry =
VAR _maxValue =
MAXX ( VALUES ( Table2[Customer Industry] ), [Rank] )
RETURN
CALCULATE (
MIN ( Table2[Customer Industry] ),
FILTER ( VALUES ( Table2[Customer Industry] ), [Rank] = _maxValue ),
REMOVEFILTERS ( Table2[SalesPerson] )
)Hi MFelix ,
so that's not throwing up the error anymore, but it's still not working - the measure only returns the industry of the customer, if they HAVE brought the drink, it doesn't return the top industry for that drink
- MFelix2 years agoSuper User
Now I understand try the following update:
TopIndustry = VAR _maxValue = MAXX ( VALUES ( Table2[Customer Industry] ), [Rank] ) RETURN CALCULATE ( MIN ( Table2[Customer Industry] ), FILTER ( VALUES ( Table2[Customer Industry] ), [Rank] = _maxValue ), REMOVEFILTERS ( Table2[SalesPerson], Table2[Customer Name] ) )- Redacted_VAR2 years agoHelper I
Hey,
nope still returns the same as the above - no change from before.
- MFelix2 years agoSuper User
Hi Redacted_VAR ,
Without the model it's difficult to give you a correct answer.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.