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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.