cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CullenC Frequent Visitor
Frequent Visitor

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 5
Microsoft v-yulgu-msft
Microsoft

Re: OR Logic for Slicing data on a dashboard

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] )
    )
)

1.PNG

 

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.

3.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CullenC Frequent Visitor
Frequent Visitor

Re: OR Logic for Slicing data on a dashboard

@v-yulgu-msft,

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!

Microsoft v-yulgu-msft
Microsoft

Re: OR Logic for Slicing data on a dashboard

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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CullenC Frequent Visitor
Frequent Visitor

Re: OR Logic for Slicing data on a dashboard

Hi @v-yulgu-msft

These Primary and Secondary Relationship Managers will have to meet with their clients a couple times a year. Part of my Data is the Review Date for these meetings.

 

Using a Count of Review Date as the Value and the Date (Months) as the x-axis, I want the team to see a distribution of meetings over the year. Additionally, I'd like them to be able to click the slicer from the first part of this post, and see a personalized distribution of their involvement as a Primary OR a Secondary Manager. 

 

If that doesn't make sense I'll try to provide screen shots and sample Data.

 

Thanks!

 

Microsoft v-yulgu-msft
Microsoft

Re: OR Logic for Slicing data on a dashboard

Hi @CullenC,

 

As I don't know your table structure and how to calculate the "Count of Review', it would be better you can post sample data and screenshot.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors