Forum Discussion
DATA Slice Interaction
- Anonymous2 years ago
Hi David1205 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a name dimension table (DO NOT create any relationship with the fact table)
Employees = VALUES('Table'[Name])2. Create a measure as below
Flag = VAR _emps = ALLSELECTED ( 'Employees'[Name] ) VAR _depts = CALCULATETABLE ( VALUES ( 'Table'[Department] ), FILTER (ALLSELECTED( 'Table'), 'Table'[Name] IN _emps ) ) RETURN IF ( SELECTEDVALUE ( 'Table'[Department] ) IN _depts, 1, 0 )3. Create a slicer which apply the field [name] of dimension table and a table visual. Then apply a visual-level filter for the table visual with the condition (Flag is 1)
Best Regards
Example:
Data Structure:
| Name | Department |
| Luis | Marketing |
| Frank | Marketing |
| Peter | M&A |
| Valentin | Marketing |
In my report I set the data slicer "name" to "Valentin". The following table should then be displayed in my report:
| Name | Department |
| Luis | Marketing |
| Frank | Marketing |
| Valentin | Marketing |
- Anonymous2 years agoNot applicable
Hi David1205 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a name dimension table (DO NOT create any relationship with the fact table)
Employees = VALUES('Table'[Name])2. Create a measure as below
Flag = VAR _emps = ALLSELECTED ( 'Employees'[Name] ) VAR _depts = CALCULATETABLE ( VALUES ( 'Table'[Department] ), FILTER (ALLSELECTED( 'Table'), 'Table'[Name] IN _emps ) ) RETURN IF ( SELECTEDVALUE ( 'Table'[Department] ) IN _depts, 1, 0 )3. Create a slicer which apply the field [name] of dimension table and a table visual. Then apply a visual-level filter for the table visual with the condition (Flag is 1)
Best Regards