Forum Discussion

xhead's avatar
xhead
Helper II
9 years ago
Solved

Measure with SUMMARIZE

  I have a table with Sales data at the item level. The table has an OrderID column that contains the order number of the item so many items share the same OrderID. Also, an order can have items add...
  • Vvelarde's avatar
    9 years ago

    xhead

     

    Hi Mike:

     

    Use this and let me know if solve your issue

     

    OrderTotal =
    SUMX (
        SUMMARIZE (
            Table1,
            Table1[OrderID],
            "ORDERCOUNT", IF (
                SUM ( Table1[OrderCount] ) > 0,
                1,
                IF ( SUM ( Table1[OrderCount] ) < 0, -1, 0 )
            )
        ),
        [ORDERCOUNT]
    )