Forum Discussion

mihaipaculea's avatar
mihaipaculea
New Member
5 years ago
Solved

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 Replies