Forum Discussion
ADDCOLUMNS and actual values return (e.g. text string)
Here's a screenshot of the (actual) relevant model (below). The Three Data Sets being linked are colored and labeled. Balance are shared lookup tables to allow for the tree data sets to talk to one another. T1 contains "Drawings", T5 contains "Deliverables" (each of which contain multiple drawings), and T9 Contains "Needs IDs" (some of which pertain to multiple Deliverables). T1 Drawings link to T5 Deliverabels via T3 which contains both and uses T2 as the lookup between it and T1, and uses T4 as the lookup between it and T5 etc...
- igaca9 years ago
Helper III
No. value "Type A" is really is a reference to a "Drawing No." within the real data set I am working with, whereas value "Type B" is a reference to a "Deliverable". There are multiple drawings for any given deliverable, hence Table 2 (in the hypothetical example provided in the original post) will contains many more "Type A" values than those of "Type B" (many "Type A's" for each "Type B").
What I would like to be able to do is create a virtual summary table that reflects all the matching values across various data sets/levels of granularity.
Thank you!
- hohlick9 years ago
Continued Contributor
I think this should work:
// here could be FILTER also in the first row
CALCULATETABLE ( SUMMARIZE ( Table2, Table2[Type B Values], Table2[Type A Values] ), Table2[Type A Values] = CALCULATETABLE ( INTERSECT ( VALUES ( Table1[Type A Values] ), VALUES ( Table3[Type A Values] ) ) ) )or this (the same in fact):
SUMMARIZECOLUMNS ( Table2[Type B Values], Table2[Type A Values], CALCULATETABLE ( Table2, CALCULATETABLE ( INTERSECT ( VALUES ( Table1[Type A Values] ), VALUES ( Table3[Type A Values] ) ) ) ) )- igaca9 years ago
Helper III
Works like a charm and more importanly, I think I understand your approach - bravo and thank you Maxim!
Now let me see if I can complicate things a bit :) :
Should there be a need to add another column of values "Type C" which match the returned column of values "Type B" called out in the SUMMARIZE() and filtered in the initial CALCULATETABLE() filter argument, how might one go about that one?
I'm working on it now and will update the post if I resolve the question but I would love to see someone else's (likely better) approach.
Thanks again!
Igor