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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.