Forum Discussion

Mahamood0218's avatar
Mahamood0218
Icon for Helper II rankHelper II
4 years ago

Spilt the Columns in Power bi Table

Hi Experts,

 

I have a PBI Table  Active Table with two coulmns(Action_ID and Action_Reactive ) my requirement is by using "Active Table" i want to create Dimension table along with New Column as Test Result . In Test Result i want to show "Action_Reactive" Coulmn field data as Vol and Invol. In Action_Reactive column i have a data like Material,Vol-Notice ,Invol-Coat . So my Requirement is i want display "Test Result'' data      Vol-Notice  as Vol                                                                                                                                                                                        Invol-Coat as Invol                                                                                                                                                                                     Material as    " " (Blank)                                                                                                                                       For Referal please check below screenshot

 

14 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
        Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RchLCoAgEADQu8zaoH/dRVwMIjFgGjoF3T5mIlq+Zy10LRjYkUMhjOCMhV7myJH8rR7EIXF5OQqvHJuUmXzQm76rjHxWvfk73NSLmJKMz8h663+U6gnOPQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [action_id = _t, action_reactive = _t]),
        #"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"action_id", Int64.Type}, {"action_reactive", type text}}),
        #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "result", each Text.Reverse(Text.AfterDelimiter(Text.Reverse([action_reactive]),"-")))
    in
        #"Aggiunta colonna personalizzata"
    • Anonymous's avatar
      Anonymous
      Not applicable
      let
          Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RchLCoAgEADQu8zaoH/dRVwMIjFgGjoF3T5mIlq+Zy10LRjYkUMhjOCMhV7myJH8rR7EIXF5OQqvHJuUmXzQm76rjHxWvfk73NSLmJKMz8h663+U6gnOPQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [action_id = _t, action_reactive = _t]),
          #"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"action_id", Int64.Type}, {"action_reactive", type text}}),
          #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "result", each if not Text.Contains([action_reactive],"-") then " " else Text.BeforeDelimiter([action_reactive],"-"))
      in
          #"Aggiunta colonna personalizzata"
  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Icon for Most Valuable Professional rankMost Valuable Professional

    You can select Action_Reactive column - In PQ, Add column menu - Extract - Text before delimiter - Put "-" without quotes in Delimiter and under Advanced options - Select from the end of the input

  • Hi 

    Vijay_A_Verma Anonymous  now i am getting the split data

    but when i close and apply button in Transform editor i am getting issue like below 

     

    Could you please suggest me

     

    • Vijay_A_Verma's avatar
      Vijay_A_Verma
      Icon for Most Valuable Professional rankMost Valuable Professional

      Do you have 64 bit of Power BI installed? This you can see in Help - About.

      Another thing you can try is to delete existing query and make the query afresh.

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Icon for Community Champion rankCommunity Champion

    NewStep=Table.AddColumn(PreviousStepName,"test",each List.Reverse(Text.Split([Action_Reactive],"-")){1}?)

    • Vijay_A_Verma's avatar
      Vijay_A_Verma
      Icon for Most Valuable Professional rankMost Valuable Professional

      Method will stay the same. There is no change in that.