cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

DAX Lookup with multiple results for visual

Hi All, 

 

I have a table as below:

 

Cost Center ID     Contract ID         Value 1           Value 2

1                           1A                       A                     A

1                            1B                      b                      b

1                            1C                      c                       c

2                             2A                     A                      A

2                             2b                     B                       B

 

 

And I have a dashbord that shows individual Contract ID

What I need is to list all other contract IDs that are associated to the saame cost center

 

So when I drill down for Contract 1A  I want a table where I will have a table or matrix as below:

Other Contracts:

1B

1C

 

And same if I drill down for Contract 1B:

Other Contracts:

1A

1B

 

How can I lookupd with multiple results and also ignor the drill throught filter

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: DAX Lookup with multiple results for visual

hi, @Krcmajster 

After my research, you could try this way:

Step1:

Duplicate the basic table. (It could not be achieve in basic table, because if you select one data, other data will be filtered )

Step2:

Create a measure like this:

DAX Lookup = 
CALCULATE (
    MAX ( 'Duplicate Table'[Contract ID] ),
    FILTER (
        'Duplicate Table',
        AND (
            'Duplicate Table'[Cost Center ID] IN VALUES ( 'Table'[Cost Center ID] ),
            NOT ( 'Duplicate Table'[Contract ID] ) IN VALUES ( 'Table'[Contract ID] )
        )
    )
)

Step3:

Drag data fields from duplicate table into table visual and also drag this measure into visual level filter and set is not blank.

Result:

9.JPG10.JPG

Best Regards,
Lin

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

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: DAX Lookup with multiple results for visual

hi, @Krcmajster 

After my research, you could try this way:

Step1:

Duplicate the basic table. (It could not be achieve in basic table, because if you select one data, other data will be filtered )

Step2:

Create a measure like this:

DAX Lookup = 
CALCULATE (
    MAX ( 'Duplicate Table'[Contract ID] ),
    FILTER (
        'Duplicate Table',
        AND (
            'Duplicate Table'[Cost Center ID] IN VALUES ( 'Table'[Cost Center ID] ),
            NOT ( 'Duplicate Table'[Contract ID] ) IN VALUES ( 'Table'[Contract ID] )
        )
    )
)

Step3:

Drag data fields from duplicate table into table visual and also drag this measure into visual level filter and set is not blank.

Result:

9.JPG10.JPG

Best Regards,
Lin

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

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors