Forum Discussion
Filter data that match all conditions in other table (multiple columns) - row by row
- Anonymous2 years ago
Hi Marek12345
Do you mind creating a table visual like this?
Or a matrix visual like this?
To achieve above result, you need to transform the Criteria table into below format. Steps are:
1. Select "Criteria" column and unpivot other columns.
2. Filter out empty values in "Value" column.
Then create the following measure
Is Met ? = VAR _criteriaFields = SUMMARIZE(Criteria,Criteria[Value]) VAR _userFields = SUMMARIZE('Table','Table'[Conditions]) RETURN IF(COUNTROWS(INTERSECT(_criteriaFields,_userFields))=COUNTROWS(_criteriaFields),1,0)As two tables are not connected to each other, you need to add this measure to the table or matrix, otherwise it will display an error saying "Can't determine relationships between fields."
Hope this would be helpful.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
This will stumble at the first hurdle -
User 1 meets Criteria 1 and Criteria 2 so C1, C2, C5, C6 and C3 should be uploaded to the model, but not C4 (which he also has).
"User" plays no role in the loading of data into the model.
You need to load all data, and then use filters or RLS or perspectives to provide each user with their view.
Ok, I will load all the data into the model - no problem.
I don't want to have a view per user, I woul like to get one table that is stating the following:
| User 1 | Criteria 1 |
| User 1 | Criteria 2 |
| User 2 | Criteria 1 |
| User 4 | Criteria 4 |
Can you help me with such a measure?