Forum Discussion

unknown917's avatar
unknown917
Icon for Helper IV rankHelper IV
6 months ago
Solved

Calculating a divide for a table - what am I missing??

I have a table like below, that details cases & hrs for a large datatset.  The intent here is to calculate cases per hr.  The desired result is to be able to visualize CPH at 3 different levels:  Cumulative CPH (if no slicer selected), Unit (when selected), Hub (when selected) and finally down to the building CPH.  I have no problem getting the correct number at the row level, but once I remove slicers, the calc is no longer correct.  It must be simple, but I'm having a total block.

 

UnitHubBldgCasesHrs
11a778331396
11b757131121
11c4209536081
12d20723515
12e2428742769
12f1893183233
23g3643893777
23h80995910862
23i4269256403
24j119439425
24k1384452190
24l5045906522

 

Any help would be greatly appreciated!

  • This will work correctly at all levels, 

    Total Cases = SUM(Table[Cases])

    Total Hours = SUM(Table[Hrs])

    CPH = DIVIDE([Total Cases], [Total Hours])

                       

     

     

  • Hi unknown917,

    can you please clairfy better what you want to achieve, showing examples of the 3 levels you are defining?

     

    1 - Cumulative with respect to what?

    2 - Unit - what do you mean here? And here the CPH would still need to be cumulative?

    3 - Hub - what do you mean here? And here the CPH would still need to be cumulative?

    Please show images and clearly point out the desired results including in case slicer etc

     

    Thanks

    If this helped, please consider giving kudos and mark as a solution

    @me in replies or I'll lose your thread

    Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

    Consider voting this Power BI idea

    Francesco Bergamaschi

    MBA, M.Eng, M.Econ, Professor of BI

     

6 Replies

  • This will work correctly at all levels, 

    Total Cases = SUM(Table[Cases])

    Total Hours = SUM(Table[Hrs])

    CPH = DIVIDE([Total Cases], [Total Hours])

                       

     

     

  • Hi unknown917,

    can you please clairfy better what you want to achieve, showing examples of the 3 levels you are defining?

     

    1 - Cumulative with respect to what?

    2 - Unit - what do you mean here? And here the CPH would still need to be cumulative?

    3 - Hub - what do you mean here? And here the CPH would still need to be cumulative?

    Please show images and clearly point out the desired results including in case slicer etc

     

    Thanks

    If this helped, please consider giving kudos and mark as a solution

    @me in replies or I'll lose your thread

    Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

    Consider voting this Power BI idea

    Francesco Bergamaschi

    MBA, M.Eng, M.Econ, Professor of BI