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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
s-white
Regular Visitor

Forecasting

Hi all, 

Please, I need help with this.  Any suggestions/ links/ tutorials will go a long way 

 
 
I have an employee table with data from Jan 2022 up until Dec 2022 with these columns
 
Dates worked  ( these are date times from Jan 1 to Dec 2022). 
Actual number of days worked by each employee in each month from Jan  2022 to Dec 2022 (let's denote it by a)
Average productivity for each employee ( let's denote it by b)
Standard deviation of productivity for each employee (let's denote it by c)


In addition, I have a date table with  a column that has the maximum number of working days available in each month. This  date table  runs from Jan 2022 until Dec 2024 (For example these numbers will be 19, 23, 23 for Jan 2022, Feb 2022 and March 2022; it continues like that until Dec 2024)
 


What I want to achieve:

Starting Jan 2023, I want to look through the actual number of days worked by each employee from Jan 2022 to Dec 2022 and select the lowest 2nd minimum. ( lets, call this d)
 
Then, with the lowest 2nd minimum found,  I want a random number  between the lowest  second minimum and the  maximum number of working days in Jan 2023.  The selected random number will be the actual number of working days for that employee in Jan 2023.
 
It then looks through from Jan 2022 to Jan 2023, picks the 2nd lowest minimum and generates a random number between this 2nd lowest  minimum and the maximum number of working days in Feb 2023. The selected random number will be the actual number of working days for that employee for Feb 2023.
 
It repeats the same process up until Dec 2023.

At the end of the day, I want to have a table  with  3 columns 
Year-Month ( For dates worked by employee)
2nd lowest minimum ( For each month from Jan 2023 until Dec 2023) 
Productivity = Norm. INV( 40,60)/100, b,c) *d
 
The goal is to visualize Year-Month and Productivity on a line chart. 

Thank you!
1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @s-white 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.