Forum Discussion

bvbull200's avatar
bvbull200
Helper III
3 years ago
Solved

Join Two Columns to Single Attribute Table

I have two tables.  The first is a table that lists each sku number one time and has a number of attributes for each one.  The second is a table that lists each combination of a main sku with its acc...
  • barritown's avatar
    barritown
    3 years ago

    bvbull200,

    Try this non-ideal solution first with your big data. If it works, we will see if it can be idealized furhter. 🙂

    The idea is:

    1) You create an additional table with this code:

    In plain text:

    Accessories Extended = 
    UNION ( Accessories, 
            ADDCOLUMNS ( SUMMARIZE ( Accessories, [Main SKU] ), "Accessory SKU", [Main SKU], "Priority", 0 ) )

    2) Then you create a relationship:

    3) Then - an hierarchy:

     

    4) Then you create a set of measures like this one:

    Part #_ = 
    IF ( ISINSCOPE ( 'Accessories Extended'[Accessory SKU] ),
         MIN ( Attributes[Part #] ),
         BLANK () )

    5) Then you add a matrix visual an populate it with the hierarchy and the measures:

     

    Best Regards,

    Alexander

    My YouTube vlog in English

    My YouTube vlog in Russian