Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Deez
Advocate I
Advocate I

Label an account that falls within a range (Unrelated tables)

Hi All,

 

I have a possible challenge for you PowerBI experts!

 

I have 2 Unrelated tables,

 

1st table with a list of accounts:

AccTable.PNG

 

2nd UNRELATED table with a range of accounts with a description that I would like to join onto the above table as a new field : Description

AccRange.PNG

 

My end result is to look like this with a Description against each account:

AccTableOutcome.PNG

 

Any ideas?

 

Just a note: Its my first project using PowerBI so I fall into the dummy category.Smiley Indifferent

Please provide as much detail as you can.Man Very Happy

Best regards.

Deez

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Deez ,

 

Create a calculated table.

Result_Table =
VAR temp =
    FILTER (
        CROSSJOIN ( VALUES ( '1st'[Account] ), '2nd' ),
        '1st'[Account] >= '2nd'[DIMENSION FROM]
            && '1st'[Account] <= '2nd'[DIMENSION TO]
    )
RETURN
    SELECTCOLUMNS ( temp, "Account", [Account], "DESCRIPTION", [DESCRIPTION] )

1.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.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Deez ,

 

Create a calculated table.

Result_Table =
VAR temp =
    FILTER (
        CROSSJOIN ( VALUES ( '1st'[Account] ), '2nd' ),
        '1st'[Account] >= '2nd'[DIMENSION FROM]
            && '1st'[Account] <= '2nd'[DIMENSION TO]
    )
RETURN
    SELECTCOLUMNS ( temp, "Account", [Account], "DESCRIPTION", [DESCRIPTION] )

1.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.

Hi @v-yulgu-msft,

 

That worked perfectly! Many thanks!

 

 

Regards,

Deez

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.