Forum Discussion
Join Two Columns to Single Attribute Table
- 3 years ago
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
I have finally made it back from some time away from this project and implemented this solution. It works as advertised. My tables have a lot more attributes than in the example, so there is a little more work I'm doing to get this far, but I wanted to thank you for the help in getting me this far. I came to accept the solution, but looks like the admins beat me to it. Very sorry for the delay in responding.
Cheers and thank you again.
I'm glad that you're advancing, but if I remember correctly your ideal solution would include showing attributes for the top level as well. Try to enhance your measures like shown below.
And in plain text for convenience:
Price_ =
VAR CurrentMainSKU = MIN ( [Main SKU] )
RETURN
IF ( ISINSCOPE ( 'Accessories Extended'[Accessory SKU] ),
MIN ( Attributes[Price] ),
CALCULATE ( MIN ( Attributes[Price] ),'Accessories Extended'[Accessory SKU] = CurrentMainSKU ) )Best Regards,
Alexander