Forum Discussion
Iamnvt
Continued Contributor
6 years agoTable calculated with firstnonblank
Hello I have 2 tables bound by ID: Table 1: ID Name A Anna B Annie C Cud Table 2: ID Group A a A b B b B c How can I make a third table ...
- 6 years ago
hi,
I found the solution:
EVALUATE SUMMARIZE ( ADDCOLUMNS ( Table2, "new name", MINX ( FILTER ( ALL ( Table2 ), Table2[ID2] = EARLIER ( Table2[ID2] ) ), RELATED ( Table1[Name] ) ) ), Table2[ID2], [new name] )instead of FIRSTNONBLANK, I use MINX to iterate over Table2, and get the Table[Name] into Table2.
this pattern can be used with CONCATENATEX as well:
EVALUATE //SUMMARIZE(ADDCOLUMNS(Table2, "new name", MINX(FILTER(All(Table2), Table2[ID2] = EARLIER(Table2[ID2])), RELATED(Table1[Name]))), //Table2[ID2], [new name]) SUMMARIZE ( ADDCOLUMNS ( Table2, "new name", CONCATENATEX ( FILTER ( ALL ( Table2 ), Table2[ID2] = EARLIER ( Table2[ID2] ) ), RELATED ( Table1[Name] ), ", " ) ), Table2[ID2], [new name] )link to the file here: https://1drv.ms/x/s!Aps8poidQa5zk79LekgUdhxarsSh5A?e=pDN3qI
amitchandak
Super User
6 years agoIamnvt , Try like summarize(filter(Table1, Table1[Identification name] =max(Table2[Identification group])),Table1[Identification name],Table2[Identification group], "Number",
FIRSTNONBLANK(Table1[Name],""))
Iamnvt
Continued Contributor
6 years agoamitchandak it is not working. Summarize can't call out the columns not in the table of Summarize