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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Production calendar with quantities

Hello,

 

I'm trying to make a production calendar with start and end date for each production order and product as well as single and summed quantities.  Here is a sample data, similar to the one I want to use:

 

Prodcution calendat - data.jpg

 

The visual effect which I'm looking for is something like this:

 

Prodcution calendat - visual.jpg

 

Thanks!

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

 

I've seen a few different approaches to this type of problem, this is one using some M custom columns in Query Editor in PowerBI to generate a 'X Daily Value by Date'.  Detailes below by each screen shot:

 

Thank You,

FOrrest

 

1:  Here's the first code for a Custom Column to divide the Total Production by the number of days between Start and Due.  (Adding 1 to Inclusive the 2 dates.)

= [Total_Prod_Qty] / (Duration.Days(Duration.From([Run_Due_Date]-[Run_Start_Date]))+1)

Capture.PNG

 

2:  Next we need to identify all the individual dates between the Start Date and Due Date.  This M code will generate a Custom Column with these dates in LIST format.  You can expand this list as shown below to get a ROW for each date between the Start and Due Dates.  ** Adding your Daily Total in Stpe 1 FIRST automatilly spreads this value out during this steps. **

= { Number.From([Run_Start_Date])..Number.From([Run_Due_Date])}

Capture2.PNG

 

3:  Format the new Column as a DATE for Power BI to convert the date numbers to a more user friednly format.  Now we can start building visuals based on this new Date Custom Column in Power BI

Capture3.PNG

 

4:  The Matrix in this screen shot is cloest to what you where looking to build.  The Matrix set-up is shows in the screen shot.  I haven't played with colors yet, but it's a start.  I also created the stacked bar graph with nicely shows the upcoming drop off of production!

Capture4.PNG

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

2 REPLIES 2
fhill
Resident Rockstar
Resident Rockstar

 

I've seen a few different approaches to this type of problem, this is one using some M custom columns in Query Editor in PowerBI to generate a 'X Daily Value by Date'.  Detailes below by each screen shot:

 

Thank You,

FOrrest

 

1:  Here's the first code for a Custom Column to divide the Total Production by the number of days between Start and Due.  (Adding 1 to Inclusive the 2 dates.)

= [Total_Prod_Qty] / (Duration.Days(Duration.From([Run_Due_Date]-[Run_Start_Date]))+1)

Capture.PNG

 

2:  Next we need to identify all the individual dates between the Start Date and Due Date.  This M code will generate a Custom Column with these dates in LIST format.  You can expand this list as shown below to get a ROW for each date between the Start and Due Dates.  ** Adding your Daily Total in Stpe 1 FIRST automatilly spreads this value out during this steps. **

= { Number.From([Run_Start_Date])..Number.From([Run_Due_Date])}

Capture2.PNG

 

3:  Format the new Column as a DATE for Power BI to convert the date numbers to a more user friednly format.  Now we can start building visuals based on this new Date Custom Column in Power BI

Capture3.PNG

 

4:  The Matrix in this screen shot is cloest to what you where looking to build.  The Matrix set-up is shows in the screen shot.  I haven't played with colors yet, but it's a start.  I also created the stacked bar graph with nicely shows the upcoming drop off of production!

Capture4.PNG

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Anonymous
Not applicable

Thanks a lot. Works very good!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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