Forum Discussion
Filter two different tables
Hi,
I need some help if it is possible.
I have a table with data like this
Table: data
| dataName | info2 | info3 | policyName | |
| info1.1 | info1.2 | info1.3 | policy1,policy2,policy3 | |
| info2.1 | info2.2 | info2.3 | policy2,policy3,policy4 |
And I have another table.
Table: policyNames
| policyName |
| policy1 |
| policy2 |
| policy3 |
| policy4 |
And I need to filter selecting from the second one and see how many rows from the table data or the column dataName have in them the selected policy.
Thank you in advance
1 Reply
- Ashish_Mathur
Super User
Hi,
In the Query Editor, right click on the PolicyName column of the Data Table and select Split Column > By delimiter. Select comma as the delimiter and expand Advanced Options. Select Rows there. Right click on the column and sleect Trim. Create a relationship (Many to One and Single) from the PolicyName column to the PolicyName column of the PolicyNames Table. To your Table visual, drag the PolicyName column from the PolicyNames Table and write this measure
Measure = countrows(Data)
Hope this helps.