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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Unpivot columns and convert to date?

So I don't see anywhere that I can attach a file so I'll have to use excel screenshots to show my example. The first screenshot below is an example excel workbook of how the data will be brought into my Power BI model. The screenshot after it is how I need the data trasformed. I know I can select all the Actual and Budget columns and then do "Unpivot Columns." I guess I am stuck on how to then create a measure to differentiate between actuals and budget amounts while also converting the "Jan 17" "Feb 17" etc to a date type field. Is it possible to take this original data source and then have measures based on "Actual" or "Budget" based on date?

 

Thanks for the help!

 

 

Before.pngAfter.png

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

After test, the solution @RolandsP posted is right. After unpivot all columns, you will get the following data.

1.PNG

Then select the [Attribute] click Split column by delimiter (Select "space" and right-most delimiter) as follows, you will get expected result.

2.PNG

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

After test, the solution @RolandsP posted is right. After unpivot all columns, you will get the following data.

1.PNG

Then select the [Attribute] click Split column by delimiter (Select "space" and right-most delimiter) as follows, you will get expected result.

2.PNG

Best Regards,
Angelia

RolandsP
Resolver IV
Resolver IV

You have to do following:

1) Select and unpivot all Value columns.

2) Select column that contains date and "actual" or "budget" attribute. Then do Split column by delimiter (Select "space" and right-most delimiter).

3) Then you should have 3 columns: Date, Budget/Actual and Value.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.