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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CM_Mills
Helper II
Helper II

Latest Date Value Measure

Hi,

 

Number - Lots = CALCULATE( MAX('Data'[Number - Lots (Original)]), FILTER( ALL('Data'), 'Data'[Date - Trade] = MAX('Data'[Date - Trade]) ) )

 

 

I have the measure above thats aim to take the last number in a period of time. For Example from below I would only want to see 12 as the result.

 

01 Jan 21 - 10

02 Jan 21 - 11

03 Jan 21 – 12

 

This is working when there is only 1 number per date. If there is more than 1 number it is not summing them together. In the example below I would want it to return 15 but it’s returning either 3 or 12.

 

01 Jan 21 – 10

01 Jan 21 – 15

02 Jan 21 - 5

02 Jan 21 - 11

03 Jan 21 – 12

03 Jan 21 - 3

 

Can you please assist me in fixing this?

1 ACCEPTED SOLUTION
Alf94
Solution Supplier
Solution Supplier

Hi @CM_Mills,

 

Can you try the following measure?

 

 

Measure =
    VAR _maxDate = MAX( 'Table'[Date] )
    RETURN
        CALCULATE(
            SUM( 'Table'[Value] ),
            'Table'[Date] = _maxDate
        )

 

 

Here is what I get on my side:

 

Alf94_0-1695981226704.png

 

If I answered your question, please mark my post as a solution.

 

Best,

View solution in original post

1 REPLY 1
Alf94
Solution Supplier
Solution Supplier

Hi @CM_Mills,

 

Can you try the following measure?

 

 

Measure =
    VAR _maxDate = MAX( 'Table'[Date] )
    RETURN
        CALCULATE(
            SUM( 'Table'[Value] ),
            'Table'[Date] = _maxDate
        )

 

 

Here is what I get on my side:

 

Alf94_0-1695981226704.png

 

If I answered your question, please mark my post as a solution.

 

Best,

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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