I am relatively new to Power BI and have gotten in over my head. I like that it is easy to basic tasks but stuck on more complex calculations. I am trying to analyze a production system where people work on two shifts (Day,Night) and produce widgets. I would like to compare shift average widget production to individual shift average production then normalized by the number of shifts each person worked as compared to the average hours work against individual hours worked. Here is a sample production log:
I can get the result that I want but my model is probably too messed up since the result does not change when I change the date
This is my model:
Widget Data Model
I'm not asking anyone to solve this problem for me but would be interested in anyone pointing out bad habits or recommend a path to good practices. Thanks
@sps-reporter model looks ok to me but you are missing date dimension, As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.
Thanks, I could share the PBIX file. The data is sanitized and from an Excel Spreadsheet. I can see how to up load the file. I have a Pro license but it is not letting create a embed link. What is the best way to share a PBIX file with the forum?
Thanks after some head banging I got it figured out. I was making this more complicated than I needed to. I was thinking in terms of tables when measures were needed. For those who find this afterwards maybe this PBIX will help. Appreciate any comments that one might have on this.
Oh, is there a way to safe the "under the hood" DAX expressions, for measures and tables, to a file?
Thanks for your reply. I am still banging my head on this. I get the correct answers when all the dates are selected but when I choose a subset of the data by date the answers are wrong and it appears most of the measures are still be calculated on all dates. Here is my PBIX file.
I bet there is something simple that I am missing because it seems power bi is built to do these types of calculations
I added a date table to my model but I am still getting the wrong answers Here is my PBIX file. When I slice by a date the calculations are still be done over all the data. I need to be able to show a table and graph like the one in this PBIX file in my working model. This example is just one that can be easily verified.