Forum Discussion

Rate's avatar
Rate
Helper III
7 years ago
Solved

Help with creating new Rows from previous rows in same table

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...
  • jdbuchanan71's avatar
    7 years ago

    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"
        )
    )