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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
vinb4u2
Regular Visitor

Data allignment

Hi Team,

I have data muliple app data like below


AppId , App server  OS                                      DB Server OS                                 Web server OS
APP0006 WINDOWS SERVER 2019
APP0006                                                  Windows SERVER 2012 R2 STANDARD
APP0006                                                                                                          WINDOWS SERVER 2016

 

and  I need to format like below

AppId                  App server OS                                 DB Server OS                                            Web server OS
APP0006,  WINDOWS SERVER 2012 R2 STAND     WINDOWS SERVER 2012 R2 STANDARD    WINDOWS SERVER 2019

4 REPLIES 4
vinb4u2
Regular Visitor

Hi Jianbo

Thanks for your reply and its working fine with single record, some time i got two servers for each app like below 

 

AppId                  App server OS                                 DB Server OS                                            Web server OS
APP0006,  WINDOWS SERVER 2012 R2 STAND     WINDOWS SERVER 2012 R2 STANDARD    WINDOWS SERVER 2019

APP0006                                                            Windows SERVER 2012 R2 STANDARD
APP0006  WINDOWS SERVER 2016                                                                          WINDOWS SERVER 2016 

and i need format  out put like

 

AppId                  App server OS                                 DB Server OS                                            Web server OS
APP0006,  WINDOWS SERVER 2012 R2 STAND     WINDOWS SERVER 2012 R2 STANDARD    WINDOWS SERVER 2019

APP0006  WINDOWS SERVER 2016 

 

Please suggest

 

Hi @vinb4u2 ,

 

Why is there only WINDOWS SERVER 2019 and not WINDOWS SERVER 2016 in your results under Web server OS, am I misunderstanding? Can you please explain in detail how the results should be generated?

vjianbolimsft_1-1673421096952.png

Best Regards,

Jianbo Li

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

Sorry. Typo. used table format below give more clarity 

App idApp server  OSDB Server OSWeb server OS
APP0006WINDOWS SERVER 2019  
APP0006 Windows SERVER 2012 R2 STANDARD 
APP0006  WINDOWS SERVER 2016
APP0006WINDOWS SERVER 2016  

 

Output shd be

App idApp server  OSDB Server OSWeb server OS
APP0006WINDOWS SERVER 2019Windows SERVER 2012 R2 STANDARDWINDOWS SERVER 2016
APP0006 WINDOWS SERVER 2016  
v-jianboli-msft
Community Support
Community Support

Hi @vinb4u2 ,

 

Please try:

Unpivot the columns:

vjianbolimsft_0-1673403658270.png

Then Pivot the columns:

vjianbolimsft_1-1673403691144.png

vjianbolimsft_2-1673403706911.png

Here is the M code:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcgwIMDAwMFPSUQr39HPxDw9WCHYNCnMNUjAyMLQEioJQrA6yOpDSzLyU/PJiJKVGCkFGCsEhjn4ujkEuWPVgtcFMKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [AppId = _t, #"App server OS" = _t, #"DB Server OS" = _t, #"Web server OS" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"AppId", type text}, {"App server OS", type text}, {"DB Server OS", type text}, {"Web server OS", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"AppId"}, "Attribute", "Value"),
    #"Pivoted Column" = Table.Pivot(#"Unpivoted Columns", List.Distinct(#"Unpivoted Columns"[Attribute]), "Attribute", "Value", List.Max)
in
    #"Pivoted Column"

Final output:

vjianbolimsft_3-1673403752549.png

 

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.