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
solankikumar
New Member

Using change log to create weekly fact data

Hi Experts , 

I have change log table with effective date for No. of packs in Box we sell (sample below) - 3 years data

 

solankikumar_0-1713402145471.png

 

- & i have data for No. of packs as of today (for all material) - like below 

 

solankikumar_1-1713402170017.png

what would be best calc to use above which can give me what was EA in Box for all week ending in last 3 years. 

 

Thanks 

1 REPLY 1
amitchandak
Super User
Super User

@solankikumar , Have date table joined with Changed Date. Have a week column in that

 

example

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

 

 

Then have measures like

calculate(lastnonblankvalue(Date[Date], Sum(Table[New Value])), filter(all(Date), Date[Date] <= Max(date[Date]) ) )

 

Use this along with Week start/end date from date table and other from table

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

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.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.