Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
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 |
|---|---|
| 13 | |
| 11 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 28 | |
| 20 | |
| 20 | |
| 19 | |
| 12 |