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
Proday83
Frequent Visitor

Calculate Total Availability per Line Weekly

Hello everyone,

 

I have a new challenge ahead of me...right now in excel we have daily imput of issues on Line1 and Line2 (line column below). I need to present Total Availability on a Weekly bases in Line chart.

Excel daily data

Proday83_0-1705055144990.png

 

 

From here I siccided to retireve all data on a daily level (planned production time is same daily for a specific Line so I could use Min or Max) to subtract sum of Total Lost Product time from Daily Planned (but on a weekly bases is problem for me, because every day can have different planned time). Formulas I used below.

Planned Production Time 

Proday83_1-1705055185798.png

 

Sum of Total Lost Line1 

Proday83_2-1705055215592.png

 

Total Availability Measure 

Proday83_3-1705055244105.png

 

So if I had possibility to add Average on Total Availability Measure it would be great. Other way I just need help with formula (mby with propper DAX formula, I can retrieve values for days and weeks in one, but not certain). Below is what I'm getting in BI and what I need.

PowerBi Matrix check 

Proday83_4-1705055271678.png

 

Thanks a lot For Help

EDIT: Sorry, I have some issues with embeding photos directly to be visable.

1 ACCEPTED SOLUTION

if you need the sum of minimum, 

then change planned production time measure to  :  

sumx (

values ( date ) ,

calculate (

min ( failure_rates_data[planned production time]),

failure_rates_data[line] = "Line1"
)
)

View solution in original post

5 REPLIES 5
Proday83
Frequent Visitor

First of all, I want to thank you both. Practically, both solutions get the job done for me.

@Daniel29195 this solution with sumx is what I needed at start, It solves "mby with propper DAX formula, I can retrieve values for days and weeks in one, but not certain" this part. Now I need one measure less to get the result 🙌


@Ashish_Mathur 
If I underestood correctly, basically you did this "So if I had possibility to add Average on Total Availability Measure it would be great" with your Measure = averagex(values(Calendar[Date]),[Total availability Daily Line1])!! Thanks a lot man, you have learned me a really important thing 👍

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Measure = averagex(values(Calendar[Date]),[Total availability Daily Line1])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Daniel29195
Super User
Super User

Hello

it seems the number you want to achieve is equal to ( lets say Wk45) , the( sum (of planned production Timeline1) - sum ( total line 1 lost production time )) / sum (of planned production Timeline1)

 

 

to solve your problem try this : 

planned production time line 1 =  replace min with sum () , 

this way you will have : 

at the wk45 : 

((510 + 510 + 510 + 450 )  - 165)  /  (510 + 510 + 510 + 450 )  =  91.5%

 

 

hope this helps

if you need the sum of minimum, 

then change planned production time measure to  :  

sumx (

values ( date ) ,

calculate (

min ( failure_rates_data[planned production time]),

failure_rates_data[line] = "Line1"
)
)

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.