Forum Discussion
DAX Measure ?
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%")
Try this, it's not a calculated colum but a measure.
First > Hours: = SUM(Qry_Machine_Utilization[Hours])
Second > Calc_Measure: = FORMAT(DIVIDE([Hours:];[DaysInPeriod:]*7,2);"0.00%")
- PaulCr1257 years agoFrequent Visitor
Ronald,
Column "Hours": Native PowerBI (DAX) implicit sums based on Groupings.
DAX_Hours: (Measure) = Sum(Qry_Machine_Utilization[Hours]) They match, no problem there.
Calc_Col: (Measure) = FORMAT(DIVIDE(Sum(Qry_Machine_Utilization[Hours]),([DaysInPeriod] *7.2)),"0.00%")
Calc_Col_II: (Measure) FORMAT(DIVIDE([DAX_Hours],[DaysInPeriod]*7,2),"0.00%")
BUT... Line 1 answer I'm looking for is using 10 working days is 47.22% = 34/(10*7.2)
Your screenshot from your last post is what I'm looking for. You put me on the correct path, when I do figure out the why, I'll make sure to follow up with you.
Thanks for your time and effort.
- Ronald1237 years agoResolver III
Hi PaulCr125,
The problem must be you measure [Daysinperiod].
Put the measure in the matrix and check the value of every row.
If that isn't problem, please upload a sample of your data.
Greets,
Ronald
- PaulCr1257 years agoFrequent Visitor
That's the problem.... the days in period needs to say constant...
If I hard code the 10 into the Calc_Col_II = FORMAT(DIVIDE([DAX_Hours],10*7,2),"0.00%") , it works fine.
I need the DaysInPeriod Measure to equal the the date difference in the slider begin date and end date and stays constant.