Forum Discussion

Prasanthke's avatar
Prasanthke
Frequent Visitor
1 year ago
Solved

DAX FORMULA

How to create the calculated columns like break, production which contains only break time, production using the below mentioned data against each user.

 

User NameTask TypeActual Handling Time (min)
anandhu.krishna.v.sProduction32.1667
anandhu.krishna.v.sOtherProductive30.5
anandhu.krishna.v.sBreak30
anandhu.krishna.v.sBreak30
anandhu.krishna.v.sProduction448.2167
prasanth.k.eProduction300.9833
prasanth.k.eProduction187.1833
prasanth.k.eProduction0.2
prasanth.k.eBreak60.45
prasanth.k.eOtherProductive18
  • xifeng_L's avatar
    xifeng_L
    1 year ago

    Calculated columns don't achieve this effect, you can instead use PowerQuery's pivot function to achieve it. 

     

    For example:

     

     

    Then get the result you want.

     

     

    Finally, just load into PowerBI.

     

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~

3 Replies

  • Prasanthke's avatar
    Prasanthke
    Frequent Visitor
    User NameProductionOtherProductiveBreak
    anandhu.krishna.v.s480.383430.560
    prasanth.k.e488.16661860.5

     

    I need to have data in the above format in the calculated columns

    • xifeng_L's avatar
      xifeng_L
      Icon for Super User rankSuper User

      Calculated columns don't achieve this effect, you can instead use PowerQuery's pivot function to achieve it. 

       

      For example:

       

       

      Then get the result you want.

       

       

      Finally, just load into PowerBI.

       

       

       

      Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

       

      Thank you~