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
high20zero
Regular Visitor

Finding Start/End values for record within data log

Hello Community,

I'm a newbie here and also learning Power BI. I'm currently creating a dashboard for projects, and one of the specific values is a project estimate change. I am stuck here, and the question is how to find the initial start value and final changed value for the field TASK_ID within data log. 

Data source is SQL database.

One case is when one record has several changes and values are increasing.

need-help-with-finding-start-end-values-for-record-within-v0-158fmkf2s72e1.jpg

 

Another is when one record has a variety of changes

need-help-with-finding-start-end-values-for-record-within-v0-03b3q7cit72e1.jpg

 

I would appreciate any advice help on this topic

1 ACCEPTED SOLUTION
Akash_Varuna
Super User
Super User

Hi I suppose since your data source is sql database you could use SQL command and some window functions in your particular case to get the described output this is done before the data is loaded into power bi 

Secondly in power query you can use groupby and some operations on that like for this such as first or las after sorting the Task_Id colmn 

Third you can achieve this by writing DAX query also

Hope this helps

View solution in original post

3 REPLIES 3
Akash_Varuna
Super User
Super User

Hi I suppose since your data source is sql database you could use SQL command and some window functions in your particular case to get the described output this is done before the data is loaded into power bi 

Secondly in power query you can use groupby and some operations on that like for this such as first or las after sorting the Task_Id colmn 

Third you can achieve this by writing DAX query also

Hope this helps

Hello Akash_Varuna,

Thank you for the clue,  I used Grouping in power query, then sorted by date, then added index column to the table and filtered the very first record. Using this method I got the initial value. 

 

To get the last value I assumed that last value is the same as actual value in task estimates and joined two tables to get the final value.

 

Thank you.

No Problem Happy to help !!

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.