Forum Discussion

ABC11's avatar
ABC11
Icon for Resolver I rankResolver I
4 years ago
Solved

power Bi Matrix-add total in same column

Hello,

I have matrix -under column - SITEID-"ALBIAN" "HORIZON"  and LABORPAYCODE has lots. such as 801,802,814,809,826.... only 801 paycode represent for Regular time all other represent Overtime. I need have one column for regular time and one for overtime. In order to calculate overtime I need to add all paycode except 801. 

 

SITEIDLaborPayCode       
ALBIANALBIANALBIANALBIANHORIZONHORIZONHORIZONHORIZONGrand Total 
801802814830801802814830  
    620  24644 
    576 14.524614.5 
702 11324    839 
288  2681526.536498.5 
11       11 
324 1     325 
505  24    529 
36   156481.5 241.5 
720 136  96.524877.5 
32452.5 842 93.5 
456 18636    678 
72       72 
80521     133 
84  696 98.524830.5 
412      16 
96481 188134 12479 
708 7936    823 
9228  8636 24266 
96858.5 48 1.5 239 
6   48  18 
    590402536691 
72241     97 
192  24162  27405 
3624  460144236702 
    76056224842 
4081.5 3921121.512567 
660  24    684 
    13376112222 
    504  24528 

Thanks,

ABC

  • Hi, ABC11 

    You can  add a new calculated column 'Lable Time' to replace your original field 'LaborPayCode' in your matrix visual.

    Lable Time = IF('Table'[LaborPayCode]=801,"1Refgular time","2Over Time")

     

    Please check my sample file for more details.

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Hi,

    in your table you select column Laborpaycode and group it this way

    and then in your visual you use the groupd column instead of Laborpaycode

     

    If this post is useful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !

     

     

     

  • Hello Serpiva64,

    Thanks for your time. This will put togather only paycode. I would like to add overtime base on laborpaycode. This is matrix table. Only 801 paycode is for Regulatime. 802,814,830 all these are represent ovetime hrs.

      SITEIDLaborPayCode       
      ALBIANALBIANALBIANALBIAN HORIZONHORIZONHORIZONHORIZON 
    Employee nameEmployee NO801802814830Total801802814830Total
    Tara30000     620  24644
    Mita30001     576 14.524614.5
    Ryan30002702 11324137     
    Dinah30003288  82681526.536462.5
    Kim3000411         
    Reena30005324 1 1     
    Nola30006505  2424     
    Farah3000736    156481.5 205.5
    Dylan30008720 13637  96.524120.5
    Mike3000932452.5 47.5842 14
    Rose30010456 18636222     
    Neail3001172         
    Jit3001280521 53     

     My output should be 

    Employee nameEmployee NOHorizon Regular timeHorizon OvertimeHorizon Total timeAlbian RegulartimeAlbian OvertimeAlbian TotalTime  
    Tara3000062024644 137137  
    Mita3000157638.5614.5 88  
    Ryan30002   702 702  
    Dinah30003268194.5462.528129  
    Kim30004   112435  
    Reena30005   324 324  
    Nola30006   50537542  
    Farah3000715649.5205.53647.583.5  
    Dylan30008 120.5120.5720222942  
    Mike30009861432 32  
    Rose30010   45653509  
    Neail30011   72 72  
    Jit30012   80 80  
    • v-easonf-msft's avatar
      v-easonf-msft
      Icon for Community Support rankCommunity Support

      Hi, ABC11 

      You can  add a new calculated column 'Lable Time' to replace your original field 'LaborPayCode' in your matrix visual.

      Lable Time = IF('Table'[LaborPayCode]=801,"1Refgular time","2Over Time")

       

      Please check my sample file for more details.

      Best Regards,
      Community Support Team _ Eason
      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.