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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vchauhan011
Frequent Visitor

Convert Column values into Rows using DAX

Hello,

 

I need to convert data from one of my columns to new columns. I have two tables A and B. Table A is a measure table which has Total hours, billable hours, non billable hours measures. table B looks similar to the table in the screenshot below. Both These table are part of Power BI Dataset so I am not able to edit them into power query. 

 

Capture.PNG

I want my end result as below table. Staff name field is from different table from the same PBI dataset. Total hours, Billable hours and Non Billable hours fields are measures from the measures table

Capture.PNG

 

Is this something possible to do? 

 

Thank you very much in advance for your help. 

 

1 ACCEPTED SOLUTION
vchauhan011
Frequent Visitor

Hi,

 

I was able to figure out a way to solve the issue I was having. I used the below formula to create new measures. 

 
Leave = Calculate([Total Hours],
'Table name'[Code Description] = "Leave")
 
Thanks. 



View solution in original post

2 REPLIES 2
vchauhan011
Frequent Visitor

Hi,

 

I was able to figure out a way to solve the issue I was having. I used the below formula to create new measures. 

 
Leave = Calculate([Total Hours],
'Table name'[Code Description] = "Leave")
 
Thanks. 



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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