Forum Discussion

Clout's avatar
Clout
Icon for Helper III rankHelper III
5 years ago
Solved

Keep the transformation of data for another data sets

Hello Im new to Power BI and general new in databases. I absolved just an Udemy course this week and Im now deepening my practice.   However, I have to make for my company a dashboard (Bachelor The...
  • Jimmy801's avatar
    5 years ago

    Hello Clout 

     

    this are a lot of question. If you find a logic to transform your data, in PQ you can do it. About your question of keeping rows you could create a list of column names and then keep only them, so you are able to build a manual list and PQ keeps them automatically, so you don't need to dig into the code. About your question regarding removing empty rows at the beginning you can check my example here

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUorVwU6kZRYVl4BZKYkliWBGUX55sVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
        RemoveFirstEmptyRowsInColumn1 = Table.RemoveFirstN(#"Changed Type", each [Column1]="")
    in
        RemoveFirstEmptyRowsInColumn1

     

    Copy paste this code to the advanced editor in a new blank query to see how the solution works.

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy