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
mihaipaculea
New Member

Remodeling the data from columns to rows based on timestamp/date

Hi everyone,

 

I am an medium expierienced user of Excel but quite new to PowerBi. 

I am trying to solve a problem which I suppose will require remodeling the data but I am completly lost and search for advice on how it can be done (if it's possible) 

 

This is how I currently have data in Power BI.

 

timestamptag1tag2tag3tag4tag5tag6tag7tag8tag9tag10
10/23/2020 13:10Name1Name2Name3nullName5Name6Name7Name8Name9Name10
10/23/2020 13:15Name1Name2Name3Name4Name5nullnullnullnullnull
10/24/2020 13:10Name1Name2Name3Name4Name5Name6Name7Name8Name9Name10
10/24/2020 13:12Name1Name2Name3Name4Name5nullnullnullnullnull

 

And the table I am aiming to transform into it should look like this one: 

timestampTagsName
10/23/2020 13:10Name1
10/23/2020 13:10Name2
10/23/2020 13:10Name3
10/23/2020 13:10null
10/23/2020 13:10Name5
10/23/2020 13:10Name6
10/23/2020 13:10Name7
10/23/2020 13:10Name8
10/23/2020 13:10Name9
10/23/2020 13:10Name10
10/23/2020 13:15Name1
10/23/2020 13:15Name2
10/23/2020 13:15Name3
10/23/2020 13:15Name4
10/23/2020 13:15Name5
10/23/2020 13:15null
10/23/2020 13:15null
10/23/2020 13:15null
10/23/2020 13:15null
10/23/2020 13:15null
10/24/2020 13:10Name1
10/24/2020 13:10Name2
10/24/2020 13:10Name3
10/24/2020 13:10Name4
10/24/2020 13:10Name5
10/24/2020 13:10Name6
10/24/2020 13:10Name7
10/24/2020 13:10Name8
10/24/2020 13:10Name9
10/24/2020 13:10Name10
10/24/2020 13:12Name1
10/24/2020 13:12Name2
10/24/2020 13:12Name3
10/24/2020 13:12Name4
10/24/2020 13:12Name5
10/24/2020 13:12null
10/24/2020 13:12null
10/24/2020 13:12null
10/24/2020 13:12null
10/24/2020 13:12null

 

The initial goal of doing this transformation is because I have to perform a COUNT on each date for a specific tag name "Name1" to see how many times that tag firied in a specific time frame. 

 

If you think it's easier to adjust the COUNT to those many columns instead of changing the table I am completly open for suggestions. 

2 ACCEPTED SOLUTIONS
v-kelly-msft
Community Support
Community Support

Hi  @mihaipaculea ,

 

Go to query editor>select all the tag columns>unpivot columns:

Screenshot 2020-11-02 150031.png

And you will see:

Screenshot 2020-11-02 150314.png

 

For the related .pbix file,pls see attached.


Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @mihaipaculea ,

 

Go to query editor>select all the tag columns>unpivot columns:

Screenshot 2020-11-02 150031.png

And you will see:

Screenshot 2020-11-02 150314.png

 

For the related .pbix file,pls see attached.


Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

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.