Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone,
I have 2 tables. I want that have the 3rd table by adding measure or column. But my measure doesn't work.
Thanks for your help.
My measure:
Table 2.
Table 3I want to have.
Solved! Go to Solution.
See if this works for you:
Table 2 =
ADDCOLUMNS (
Table2,
"c", RELATED ( Table1[Response] ),
"n",
VAR A =
SELECTCOLUMNS (
FILTER ( Table1, Table1[ID] = Table2[ID] ),
"1", Table1[Report ID]
)
VAR B =
SELECTCOLUMNS (
FILTER ( Table1, Table1[Report ID] = A && Table1[Type Question] = "n" ),
"2", Table1[Response]
)
RETURN
B,
"P",
VAR A =
SELECTCOLUMNS (
FILTER ( Table1, Table1[ID] = Table2[ID] ),
"1", Table1[Report ID]
)
VAR B =
SELECTCOLUMNS (
FILTER ( Table1, Table1[Report ID] = A && Table1[Type Question] = "p" ),
"2", Table1[Response]
)
RETURN
B
)
Try this:
=
ADDCOLUMNS ( Table2, "c", RELATED ( Table1[Response] ) )regarding the other 2 columns n & p, what is the logic?
Thanks your reply.
For the n and p : in the table 1, every report_id represents one record. For example (report_id = aaa), there a one blue(c) secondhand(p) car Nissan (n). I want to have these 3 features in one line in table3. If some feature is no recorded, we substitute par No Value ( blank() ) .
Thanks one more time,
See if this works for you:
Table 2 =
ADDCOLUMNS (
Table2,
"c", RELATED ( Table1[Response] ),
"n",
VAR A =
SELECTCOLUMNS (
FILTER ( Table1, Table1[ID] = Table2[ID] ),
"1", Table1[Report ID]
)
VAR B =
SELECTCOLUMNS (
FILTER ( Table1, Table1[Report ID] = A && Table1[Type Question] = "n" ),
"2", Table1[Response]
)
RETURN
B,
"P",
VAR A =
SELECTCOLUMNS (
FILTER ( Table1, Table1[ID] = Table2[ID] ),
"1", Table1[Report ID]
)
VAR B =
SELECTCOLUMNS (
FILTER ( Table1, Table1[Report ID] = A && Table1[Type Question] = "p" ),
"2", Table1[Response]
)
RETURN
B
)
Thanks your reply. its works!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 13 | |
| 10 | |
| 8 |