Forum Discussion
OR Logic for Slicing data on a dashboard
I would like to leverage two columns (Primary Relationship Manager, and Secondary Relationship Manager) to slice my data on a dashboard. The same users can be either primary or secondary relationships.
I would like to Slice the data in a way that a user can click their name and have the dashboard filter out all records where they are not either Primary OR Secondary.
I am having a lot of difficulty accomplishing this, even though OR logic seems like a simple and common use case. Any ideas?
5 Replies
- v-yulgu-msft
Microsoft Employee
Hi CullenC,
Create a calculated table which contains only one column listing all slicer options.
All manager = UNION ( VALUES ( 'Manager Table'[Primary Relationship Manager] ), EXCEPT ( VALUES ( 'Manager Table'[Secondary Relationship Manager] ), VALUES ( 'Manager Table'[Primary Relationship Manager] ) ) )
Add above column into slicer.
Create measures as below:
Measure1 = IF ( LASTNONBLANK ( 'Manager Table'[Primary Relationship Manager], 1 ) = LASTNONBLANK ( 'All manager'[Manager Names], 1 ), 1, 0 ) Measure2 = IF ( LASTNONBLANK ( 'Manager Table'[Secondary Relationship Manager], 1 ) = LASTNONBLANK ( 'All manager'[Manager Names], 1 ), 1, 0 ) Measure3 = IF(OR([Measure1],[Measure2])=TRUE(),1,0)
Then, add corresponding fields into table visual. Add Measure3 into Visual level filters and set its filter value to 1.
Best regards,
Yuliana Gu- CullenCRegular Visitor
Thanks for the great start.
I am running into issues with how this interacts with my Bar Graph.
One nuance is that Secondary Relationship Manager is not required and is a null value in many cases. Due to this, I cannot create a relationship between the tables.
How can I account for this?
Thanks, again!
- v-yulgu-msft
Microsoft Employee
Hi CullenC,
How do you want to interact with Bar Graph? Please describe with more details.
Since "Secondary Relationship Manager is not required and is a null value in many cases", why do you need to consider this column when applying filters?
For further analysis, please provide sample data and screenshot to show your desired output.
Best regards,
Yuliana Gu