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

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

Accepted Solutions
Community Support Team
Community Support Team

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

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.
2 REPLIES 2
Community Support Team
Community Support Team

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

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.
Deez Frequent Visitor
Frequent Visitor

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

Hi @v-yulgu-msft,

 

That worked perfectly! Many thanks!

 

 

Regards,

Deez