Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello!
I am having trouble with generating new rows in my table. I have a table with a line for each product we are selling (Bread, Milk and Salt). As the Bread comes with a gift, I would want to generate a new row for every Bread sold, replicating the same information as in the said row, but changing the product sold (Gift in this case).
Original Table:
| questionnarie_response_line_id | gift_product_id | gift_product_name | gift_product_qty | created |
| 822 | 2 | Bread | 10 | 17/06/2019 9:04 |
| 943 | 2 | Bread | 10 | 17/06/2019 10:22 |
| 1397 | 2 | Bread | 3 | 18/06/2019 9:42 |
| 1389 | 6 | Milk | 5 | 18/06/2019 9:37 |
| 659 | 6 | Milk | 28 | 14/06/2019 17:15 |
| 352 | 5 | Salt | 18 | 14/06/2019 9:14 |
| 383 | 5 | Salt | 5 | 14/06/2019 9:41 |
Desired table:
| questionnarie_response_line_id | gift_product_id | gift_product_name | gift_product_qty | created |
| 822 | 2 | Bread | 10 | 17/06/2019 9:04 |
| 943 | 2 | Bread | 10 | 17/06/2019 10:22 |
| 1397 | 2 | Bread | 3 | 18/06/2019 9:42 |
| 1389 | 6 | Milk | 5 | 18/06/2019 9:37 |
| 659 | 6 | Milk | 28 | 14/06/2019 17:15 |
| 352 | 5 | Salt | 18 | 14/06/2019 9:14 |
| 383 | 5 | Salt | 5 | 14/06/2019 9:41 |
| 822 | 99 | Gift | 10 | 17/06/2019 9:04 |
| 943 | 99 | GIft | 10 | 17/06/2019 10:22 |
| 1397 | 99 | Gift | 3 | 18/06/2019 9:42 |
Do you have any idea as to how I could achieve this?
Thanks a lot!
Solved! Go to Solution.
Hello @Rate
Give this a try
Union Table =
UNION(
SUMMARIZE('Table','Table'[questionnarie_response_line_id],'Table'[gift_product_qty],'Table'[created],'Table'[gift_product_id],'Table'[gift_product_name]),
SUMMARIZE(
CALCULATETABLE(
'Table',
'Table'[gift_product_name] = "Bread"
),
'Table'[questionnarie_response_line_id],
'Table'[gift_product_qty],
'Table'[created],
"gift_product_id",VALUE("99"),
"gift_product_name","Gift"
)
)
Hello @Rate
Give this a try
Union Table =
UNION(
SUMMARIZE('Table','Table'[questionnarie_response_line_id],'Table'[gift_product_qty],'Table'[created],'Table'[gift_product_id],'Table'[gift_product_name]),
SUMMARIZE(
CALCULATETABLE(
'Table',
'Table'[gift_product_name] = "Bread"
),
'Table'[questionnarie_response_line_id],
'Table'[gift_product_qty],
'Table'[created],
"gift_product_id",VALUE("99"),
"gift_product_name","Gift"
)
)
Hello @jdbuchanan71
Wow, just WOW. Thanks so much. That worked like a Charm!
Really grateful!! You just made my day.
Thanks a lot and have an amazing day.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 30 | |
| 26 | |
| 26 |