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! Learn more
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!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
            | User | Count | 
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | 
| User | Count | 
|---|---|
| 24 | |
| 11 | |
| 10 | |
| 9 | |
| 8 |