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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SevsBo
Resolver I
Resolver I

M-Query or DAX? - find last value from first day of data entry

I have a log of changes that took place for a series of items. I need to determine what the last change was and to what value it was set on the first day of changes being made for each individual item.

 

Table with expected results outlined below.

 

Item nameDatetime US (simplified here)Original ValueNew Value
Item101/01/24 09:00null100
Item101/01/24 10:0010050
Item102/01/24 09:0050200
Item 202/01/24 09:00null1000
Item 203/01/24 12:0010002000
Item 305/01/24 10:00400300
Item 305/01/24 10:01300500
Item 306/01/24 09:00500550
Item 401/01/24 11:00null750

 

I have a good idea of how to do this in SQL but as this data comes straight from source I need to resort to using either DAX or M-Query for this task, and I would appreciate any help to achieve this!

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

ThxAlot_0-1737197726494.png

 

For fun only, to showcase the power of Excel formulas,

ThxAlot_1-1737061712765.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
v-kongfanf-msft
Community Support
Community Support

Hi @SevsBo ,

 

Did @ThxAlot reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

 

Best regards,

Adamk Kong

ThxAlot
Super User
Super User

ThxAlot_0-1737197726494.png

 

For fun only, to showcase the power of Excel formulas,

ThxAlot_1-1737061712765.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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