cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 Resolver II
Resolver II

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.

View solution in original post

3 REPLIES 3
RobinDeFal Resolver II
Resolver II

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.

View solution in original post

Community Support
Community Support

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 others 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
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

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

Top Solution Authors
Top Kudoed Authors