Forum Discussion

Adamkowalsky92's avatar
Adamkowalsky92
Frequent Visitor
1 year ago
Solved

Incorrect SUM

Hey, I need help with a simple formula. At first glance dax I wrote it is simple and in the lines it works correctly however the sum no longer match. The formula is supposed to search for the max da...
  • Adamkowalsky92's avatar
    1 year ago

    I resolves problem myself ny using

    SUMX(
        SUMMERIZE(
                  Sales,Sales[Client],"Sum",CALCULATE(SUM(Sales[Value]),Sales[Date]=MAX(Sales[Date]))),Sum)

    _


    SUMX(
        SUMMERIZE(
                  Sales,Sales[Client],"Sum",CALCULATE(SUM(Sales[Value]),Sales[Date]=MAX(Sales[Date])-1)),Sum)