Forum Discussion

Karthik12's avatar
Karthik12
Icon for Post Patron rankPost Patron
3 years ago
Solved

Required production rate calculation

Hello Team,

My power bi data as attached below.

 

I would like to calculate the required production rate for remaining working dates of the month.

 

 

I would like to have measure for 

Required rate = (sum of plan - sum of production qty)/remaining days

Current rate = (sum of production qty)/worked days

 

Can you please support?

 

 Pbix file link

Current rate and required rate.pbix

 

 

  • Hi,

    I have done this way

    Required rate = DIVIDE(([Plan sum]-[Actual]),[REMAIN])

    Current rate = DIVIDE(([Test MTD actual sum]),[Worked days])

     

    It working fine for me 🙂 

     

3 Replies

  • Karthik12 , For the current month or use max(Date[Date]) in place of today()

     

    Working Dates of month = networkdays(eomonth(today(),-1)+1, eomonth(today(),0) )

     

    Working Dates of passed= networkdays(eomonth(today(),-1)+1, today() )

     

    Working Dates of left= networkdays(today() +1 , eomonth(today(),0) )

     

    MTD Today =
    var _min = eomonth(today(),-1)+1
    var _max = today()
    return
    CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

     

    This Month Today =
    var _min = eomonth(today(),-1)+1
    var _max = eomonth(today(),0)
    return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

    • Karthik12's avatar
      Karthik12
      Icon for Post Patron rankPost Patron

      amitchandak 

      Thanks !

      Can you check my file and help for the below?

       

      I would like have measures for below both

       

      Required rate = (sum of plan - sum of production qty)/remaining days

      Current rate = (sum of production qty)/worked days

       

      Please refer my pbix file link.

       

  • Hi,

    I have done this way

    Required rate = DIVIDE(([Plan sum]-[Actual]),[REMAIN])

    Current rate = DIVIDE(([Test MTD actual sum]),[Worked days])

     

    It working fine for me 🙂