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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Mahamood0218
Helper II
Helper II

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

Mahamood0218_0-1650868822896.png

 

14 REPLIES 14
Mahamood0218
Helper II
Helper II

@Vijay_A_Verma @wdx223_Daniel @Anonymous  hi i have created dimension table for split data

Mahamood0218_0-1650974740882.png

could you please sujjest new column(Term_Text coumn ) for display vol,invol,and blank data.

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

@Vijay_A_Verma in above pic i have created Dimension table so we can try with coding is it possible?

@Vijay_A_Verma  when i try with as your sujjestion data is divided (i got the my requirment) but when i apply and close in transform edit mode again it shows the below error 

Mahamood0218_0-1651467252118.png

so i have a another technique by using dimension table we can summarize all columns into single unit then we can divide vol and invol from table

 

DimAR = ADDCOLUMNS(SUMMARIZE(TextDetails,[action_id],[action_reactive]), "TestResult", IF(FIND("-",[action_reactive],1,0) > 0, LEFT([action_reactive],
FIND("-",[action_reactive],1,0)-1)))

 

above code will work as per our requirment or do u have any idea ,pls suggest me 

 

Thanks&Regards

Just follow the step give by me and code will be automatically generated - You can select Action_Reasoncolumn - 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

If you need step, use this where Source will have to be replaced with your previous step

= Table.TransformColumns(Source, {{"Action_Reason", each Text.BeforeDelimiter(_, "-", {0, RelativePosition.FromEnd}), type text}})

if i used above code and previous method after that when i close and save in edit query i will be getting erro like below

 

Mahamood0218_0-1651036143513.png

that is main reason i have created dimension table and it is possible by applying if else statement for spilt the data?

 

In a custom column, put following formula

= if Text.Contains([Action_Reason],"-") then Text.Split([Action_Reason],"-"){0} else ""

 

wdx223_Daniel
Super User
Super User

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

@wdx223_Daniel could you please suggest step by step

Mahamood0218
Helper II
Helper II

Hi 

@Vijay_A_Verma @Anonymous  now i am getting the split data

Mahamood0218_1-1650954797898.png

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

 

Mahamood0218_2-1650955315989.png

Could you please suggest me

 

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.

Vijay_A_Verma
Super User
Super User

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

1.png

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
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"

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.