Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

I need to add a column of data which would result in additional rows - how do I do this?

I've got two tables:

Products: product name, ticket type, product ID and ticket ID

Events: product name, product id and session name

 

I want to append the product table to include the session name. This will require the addition of extra rows, as each product can have multiple sessions.

 

Any suggestions on how I can go about this?

 

Thanks! 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can join both tables in the product id and display them together, in visual

 

of you can use concatenateX(Products[Product id], Events[session name],",") to display in same line

 

or you can merge these tables in power query https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

 

View solution in original post

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you tell me if my post helps you ? If so, please kindly Accept it as the solution  to make the thread closed. More people will benefit from it.

 

Hope to hear from you😀

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use NATURALLEFTOUTERJOIN() to create a new table:

New Table =
VAR _t1 =
    SELECTCOLUMNS (
        'Products(cal_table)',
        "pid", [product ID] & "",
        "pname", [product name] & "",
        "tid", [ticket ID],
        "ttype", [ticket type]
    )
VAR _t2 =
    SELECTCOLUMNS (
        'Events(cal_table)',
        "pid", [product ID] & "",
        "pname", [product name] & "",
        "sname", [session name]
    )
RETURN
    NATURALLEFTOUTERJOIN ( _t1, _t2 )

The final output is shown below:

NATURALLEFTOUTERJOIN.PNG

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You can join both tables in the product id and display them together, in visual

 

of you can use concatenateX(Products[Product id], Events[session name],",") to display in same line

 

or you can merge these tables in power query https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

 

Anonymous
Not applicable

They're both calculated tables so I can't merge them, but I'm now trying to bypass the issue.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.