Forum Discussion

PaulCr125's avatar
PaulCr125
Frequent Visitor
7 years ago
Solved

DAX Measure ?

Below is my example... In Excel it's easy. In Power BI... I'm struggling...

User selects a begin date and end date. In the selection there is 22 work days between begin Date and end date. (Date calculation is not an issue) I need to apply the formula to the calc col in a Power BI table report. 

In Power BI there is already a Sum(Hours) Grouped By name. I need to apply the constants to the formula after the sums are calculated, in theory just like the Excel sheet.

 

 

9 Replies

    • PaulCr125's avatar
      PaulCr125
      Frequent Visitor

      Thanks for the quick reply... I did not realize DIVIDE could be used that way... thanks again..

       

      • PaulCr125's avatar
        PaulCr125
        Frequent Visitor

        Unfortunately it's still not returning the correct values.

        it should be

        60.00 Hrs/ (10 *7.2) = 104.17% InCorrect Should be 83.33%

        67.50 Hrs/ (10 *7.2) = 104.17% InCorrect. Should Be 93.75%

        34.00 Hrs/ (10 *7.2) = 118.06% InCorrect. Should Be 47.22%

        105.40Hrs/ (10 *7.2) = 162.65% InCorrect. Should Be 146.39%

        Calc_Col = FORMAT(DIVIDE(Sum(Qry_Machine_Utilization[Hours]),([DaysInPeriod] *7.2)),"0.00%")