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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
benji1908
Frequent Visitor

Change calculations depending on time frame

I'm currently trying to make a live report with data sent from a SQL server where the machines statistics are logged. For the most part it works fine, but I've encountered an issue today when switching between job numbers and parts produced.

 

The machine records houlry figures as to what it produced in parts. I then have another table that tells me how many parts go into a box, and so use this to calculate how many boxes are made. Likewise, the scrap numbers are recorded in parts, and I have a table that tells me how much a part weighs and so calculate how much scrap we've lost in weight. I am currently using MAX formula against a date/time key column that translates it into shifts, and the SQL server pushes through that we are now making a different part/order and the start time of that change. 

 

The issue I now have is I want the bar charts that plot this information hourly to retain the old information, while using the new information going forward. 

 

e.g. if we're making a part that is 100 per case for an hour and we make 1000, it will show 10 boxes. However, when the next part comes into play that is 50 per case, it will change the previous hours information to 20 boxes. Likewise with the scrap, the part may have a different weight per unit. 

 

Any advise would be greatly appreciated. 

0 REPLIES 0

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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