cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Retrieve value from another table without unique id

I have a pretty large table that has a rough layout similar to this:

Capture.PNG

I want to create a column in that table using values from a table that has a rough layout similar to this:

Capture1.PNG

However, the tables do not have a unique id. I would just make a unique id if table 1 was that small but it is much larger. I simply want to assign a count value from table 2 into table 1 based on the year and group #. So the values will be repeated in table 1. I would like a result similar to this:

Capture2.PNG

How do I go about doing this? I've tried using LOOKUPVALUE in a calculated column as well as in a measure. I am using DirectQuery but when I try to enable  “Allow unrestricted measures in Direct Query Mode," there is no option avilable to me. Others also seem to be encountering this issue: https://community.powerbi.com/t5/Desktop/Lookupvalue-function-not-appearing-Direct-Query-mode/td-p/4...

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
RobinDeFal Member
Member

Re: Retrieve value from another table without unique id

Hi @Anonymous  ,

Here is a suggestion:


NewColumn = CONCATENATE( Table[Year], Table[Group] )

 

Create this column in both tables.

 

You should then be able to join these tables with Many to One Cardinality.

Let me know how it goes.

Cheers,
Robin

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

3 REPLIES 3
RobinDeFal Member
Member

Re: Retrieve value from another table without unique id

Hi @Anonymous  ,

Here is a suggestion:


NewColumn = CONCATENATE( Table[Year], Table[Group] )

 

Create this column in both tables.

 

You should then be able to join these tables with Many to One Cardinality.

Let me know how it goes.

Cheers,
Robin

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

Community Support Team
Community Support Team

Re: Retrieve value from another table without unique id

Hi @Anonymous ,

 

We can create a measure as below.

Column = 
CALCULATE (
    MAX ( 'Table'[count] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[group] = Table1[group]
            && 'Table'[Year] = Table1[Year]
    )
)

Capture.PNG

 

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

Re: Retrieve value from another table without unique id

Thanks @RobinDeFal ! That seems obvious now that I think about it... oops!

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 321 members 3,036 guests
Please welcome our newest community members: