D. Watson
D. Watson

Reputation: 253

Measure to SUM of more recent values using DAX from PowerBI

I have the following table:

enter image description here

I need to SUM the values of more recent dates, which are the more recent?

enter image description here

The MEASURE needs return the following value: 27

Why 27?

Because it's the SUM of more recent values from which idOp.

Upvotes: 2

Views: 1724

Answers (1)

StelioK
StelioK

Reputation: 1781

This should work:

Latest Date Sum = SUMX(VALUES(Data[idOp])
                  , CALCULATE(SUM(Data[value])
                    , LASTNONBLANK(Data[Date]
                      , CALCULATE(SUM(Data[value]))
                      )
                    )
                  )

Upvotes: 1

Related Questions