Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Prasanthke
New Member

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
1 ACCEPTED SOLUTION

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

 

For example:

 

xifeng_L_0-1732296108786.png

 

Then get the result you want.

 

xifeng_L_1-1732296150071.png

 

Finally, just load into PowerBI.

 

xifeng_L_2-1732296224459.png

 

 

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

 

Thank you~

View solution in original post

3 REPLIES 3
Prasanthke
New Member

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

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

 

For example:

 

xifeng_L_0-1732296108786.png

 

Then get the result you want.

 

xifeng_L_1-1732296150071.png

 

Finally, just load into PowerBI.

 

xifeng_L_2-1732296224459.png

 

 

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

 

Thank you~

xifeng_L
Super User
Super User

Hi @Prasanthke ,

 

Is this what you wanted?

 

xifeng_L_0-1732294134573.png

 

 

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

 

Thank you~

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.