Forum Discussion

abc_777's avatar
abc_777
Solution Specialist
6 months ago
Solved

hi

Hello,   I have promotion table that has data as follows PROMOTION_CODE PROMOTION_NAME PROMOTION_TYPE AI0000048 maser er bazar 5 k nov buy-amount-get-item-free AI0000049 maser er baz...
  • techies's avatar
    6 months ago

    Hi abc_777 As i understand, you can create an Invoice–Promotion bridge table using only rows where DISC_TYPE is not blank.
    This lets the promotion slicer filter at the invoice level, so all paid and free items from the same invoice are visible.

     

    Invoice Promotion =
    DISTINCT (
        SELECTCOLUMNS (
            FILTER (
                Sales,
                NOT ISBLANK ( Sales[DISC_TYPE] )
            ),
            "INVOICE_NO", Sales[INVOICE_NO],
            "PROMOTION_CODE", Sales[DISC_TYPE]
        )
    )