Forum Discussion

AppleMan's avatar
AppleMan
Icon for Helper III rankHelper III
2 years ago
Solved

Summing column once per distinct value in table

I feel this should be easy, but I have not been able to write a measure that accomplishes it how I need it to.    To explain, here is an example table of how my data looks: Job Order Date Cre...
  • DataInsights's avatar
    2 years ago

    AppleMan,

     

    Try this measure:

     

    Sum Distinct Amount =
    VAR vTable =
        SUMMARIZE ( Test, Test[Job], Test[Amount] )
    VAR vResult =
        CALCULATE (
            SUMX ( vTable, Test[Amount] ),
            USERELATIONSHIP ( Test[CreateDate], 'Date Table'[Date] )
        )
    RETURN
        vResult