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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.