Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

sum of most recent values

Hi All,

 

I have a spreadsheet that is released bi weekly from a contractor. on the spreadsheet is the number of referrals made to a health programme i run by GP practice. 

 

As the sheets come in im adding a column in PBI for date submitted, in this case i have two seperate spreadhseets, one dated the 2nd feb 18 and one dated 14th feb 18. i appended the later one to the bottom of the earlier one

 

the spreadsheets are presummarized numbers by practice each representing one date. every time I append a new one i need my measures to show only the most recent date.

 

I cant seem to figure out how to do it - i know its something to do with LASTDATECapture edited.png2018-02-19.png

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please refer to below formula:

most recent sum =
CALCULATE (
    SUM ( 'Table'[referrals] ),
    FILTER (
        'Table',
        'Table'[Date] = CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) )
    )
)

Replace the table name and column name with the actual ones in your scenario.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please refer to below formula:

most recent sum =
CALCULATE (
    SUM ( 'Table'[referrals] ),
    FILTER (
        'Table',
        'Table'[Date] = CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) )
    )
)

Replace the table name and column name with the actual ones in your scenario.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank-you - thats really helpful 🙂

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.