Forum Discussion

fbarry's avatar
fbarry
Frequent Visitor
6 years ago
Solved

SUMX issue

Hi All,   I'm having an issue trying to get a SUMX expression to return the expected results, and after many hours of toil I am now officially stumped.  Ultimately, am trying to create a measure t...
  • mahoneypat's avatar
    mahoneypat
    6 years ago

    Please try this one.  It gets the same results on rows and correct total.  This is the more logical way I should have written it in the first place.

     

    New SUMX =
    SUMX (
    SUMMARIZE ( Invoice_items, Invoices[Inv_No], Invoice_items[Product] ),
    CALCULATE (
    DIVIDE ( SUM ( Receipts[Amount] ), SUM ( Invoices[Amount] ) )
    * SUM ( Invoice_items[Amount] )
    )
    )

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat