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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Pivot Table and Display the orginal Values instead of count/sum/etc

hi there, after pivoting the table, i lose all the values/texts.

 

Custom.1Comment.Column2
ChannelSPOTV
Date/Time Interruption01/Feb/25 0258 UTC (01/Feb/25 1058 SGT)
Date/Time Restoration01/Feb/25 0340 UTC (01/Feb/25 1140 SGT)
Impacted LocationHeadend
Effect of IncidentNo Audio on both main and backup feeds
ChannelZee Thirai / WION / Zee Tamil
Date/Time Interruption04/Jan/25 1306 UTC (04/Jan/25 2106 SGT)
Date/Time Restoration04/Jan/25 1400 UTC (04/Jan/25 2200 SGT)
Impacted LocationHeadend
Effect of IncidentLoss of feed on main feeds
ChannelTimes
Date/Time Interruption09/Feb/25 1850 UTC (10/Feb/25 0250 SGT)
Date/Time Restoration09/Feb/25 1905 UTC (10/Feb/25 0305 SGT)
Impacted LocationHeadend
Effect of IncidentLoss of signal on backup feed
ChannelDrama
Date/Time Interruption13/FEB/25 0927 UTC (13/FEB/25 1727 SGT)
Date/Time Restoration13/FEB/25 0941 UTC (13/FEB/25 1741 SGT)
Impacted LocationHeadend
Effect of IncidentLoss of signal on backup feeds

 

Because after pivoting, it is showing me this: 

ChannelDate/Time InterruptionDate/Time RestorationImpacted LocationEffect of Incident
414414414380412


i want to maintain all the values as it is. and then clean it up somemore. thanks. appreciate any help. thanks.

ChannelDate/Time InterruptionDate/Time RestorationImpacted LocationEffect of Incident
SPOTV 01/Feb/25 0258 UTC (01/Feb/25 1058 SGT)01/Feb/25 0340 UTC (01/Feb/25 1140 SGT)HeadendNo Audio on both main and backup feeds
1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi again 🙂
You can apply the M code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("tZJfT8IwFMW/ys2eNCGs3R+BRx2gGAJGpiYSHsp2J41rS7bu+9sN3AgzzkR9WvK7dyfnnNv12gqKXCvRp1bPCpQQKHU/UGkhpGNtema8Y1Jiaqarh2X4XLEx02iHXCDMpMYsK/aaK2lWCLWnuLUdH4jjD+EpDOCiYZQYtroNL89EHtE4yFhbw/VIS4MaVmvMxJ5FGmOYq+jz/ztkMcq4mk+SBCMNKjFGI26wNgsLBddFzBUoCVuldyAYl8BkDFsWvRd7SBDj/Cz8KyKEO54xDja8zJYL86kYEzztKMWz75mszLvk6hioZg41rLuURsMjpKXhkN+WMld5XqIye1lM1clXRZTm8o7Ao/paQ/9olpKTl0F+ELjRGBG/peEa9jeBc/4mWVq9heb6Z5nHGRPs+8zUtaeTm8rbyBkc/daMDgzrzHyq4dG2hmH/mPlwVDBr1mbzAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"(blank)", type text}, {"(blank).1", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([#"(blank).1"] <> "")),
#"Promoted Headers" = Table.PromoteHeaders(#"Filtered Rows", [PromoteAllScalars=true]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Custom.1"}, "Attribute", "Value"),
#"Added Index" = Table.AddIndexColumn(#"Unpivoted Other Columns", "Index", 0, 1, Int64.Type),
#"Inserted Integer-Division" = Table.AddColumn(#"Added Index", "Integer-Division", each Number.IntegerDivide([Index], 5), Int64.Type),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Integer-Division",{"Index"}),
#"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[Attribute]), "Attribute", "Value"),
#"Pivoted Column1" = Table.Pivot(#"Pivoted Column", List.Distinct(#"Pivoted Column"[Custom.1]), "Custom.1", "Comment.Column2"),
#"Removed Columns1" = Table.RemoveColumns(#"Pivoted Column1",{"Integer-Division"})
in
#"Removed Columns1"
Ot follow my dteps from UI of PQ

Ritaf1983_0-1740976832094.png

This is a little more complexed then simple pivot column

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi again 🙂
You can apply the M code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("tZJfT8IwFMW/ys2eNCGs3R+BRx2gGAJGpiYSHsp2J41rS7bu+9sN3AgzzkR9WvK7dyfnnNv12gqKXCvRp1bPCpQQKHU/UGkhpGNtema8Y1Jiaqarh2X4XLEx02iHXCDMpMYsK/aaK2lWCLWnuLUdH4jjD+EpDOCiYZQYtroNL89EHtE4yFhbw/VIS4MaVmvMxJ5FGmOYq+jz/ztkMcq4mk+SBCMNKjFGI26wNgsLBddFzBUoCVuldyAYl8BkDFsWvRd7SBDj/Cz8KyKEO54xDja8zJYL86kYEzztKMWz75mszLvk6hioZg41rLuURsMjpKXhkN+WMld5XqIye1lM1clXRZTm8o7Ao/paQ/9olpKTl0F+ELjRGBG/peEa9jeBc/4mWVq9heb6Z5nHGRPs+8zUtaeTm8rbyBkc/daMDgzrzHyq4dG2hmH/mPlwVDBr1mbzAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"(blank)", type text}, {"(blank).1", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([#"(blank).1"] <> "")),
#"Promoted Headers" = Table.PromoteHeaders(#"Filtered Rows", [PromoteAllScalars=true]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Custom.1"}, "Attribute", "Value"),
#"Added Index" = Table.AddIndexColumn(#"Unpivoted Other Columns", "Index", 0, 1, Int64.Type),
#"Inserted Integer-Division" = Table.AddColumn(#"Added Index", "Integer-Division", each Number.IntegerDivide([Index], 5), Int64.Type),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Integer-Division",{"Index"}),
#"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[Attribute]), "Attribute", "Value"),
#"Pivoted Column1" = Table.Pivot(#"Pivoted Column", List.Distinct(#"Pivoted Column"[Custom.1]), "Custom.1", "Comment.Column2"),
#"Removed Columns1" = Table.RemoveColumns(#"Pivoted Column1",{"Integer-Division"})
in
#"Removed Columns1"
Ot follow my dteps from UI of PQ

Ritaf1983_0-1740976832094.png

This is a little more complexed then simple pivot column

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @Anonymous 
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

apologies, posted sample tables. thanks.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors