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

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

Reply
miltenburger
Helper V
Helper V

New column in direct query Right function

Hi all,

 

I used DirectQuery to get data from a table out of my Kaseya Database.

One of the columns called User contains the following information:

 

abcdefgh\a.klaassen

abcdefgh\b.bass

abcdefgh\c.curry

 

I want to create a new column which contains the following information:

a.klaassen

b.bass

c.curry

 

So basically i want everything that is right from the \ in my column User.

Any idea how to do this?

9 REPLIES 9
vanessafvg
Super User
Super User

@miltenburger

 

 

 

=REPLACE('table'[fieldname],1,9,"")  

https://msdn.microsoft.com/en-us/library/ee634374.aspx





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

 

Thanks for your fast assist,

but the REPLACE function is not working when adding a new column....

only when i choose the option new measure, but that is not what i want/ and even not works

@miltenburger works fine for me what are you doing?

 

Column = REPLACE(Dates[MonthName],1,3,"")

I took the column monthname and removed the first 3 digits rom january into a new column

 

Capture.PNG

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




As @Greg_Deckler mentioned, it's a live connection, which means not all of the DAX functions work

And REPLACE won't work in this case

Anonymous
Not applicable

Hi @miltenburger,

 

Maybe you can try to write a measure to instead, there are lots of limitations when you use calculated column in directquery mode.

BTW, you can also try to add custom column in power query with these operations, but current these function seems not available in directquery mode.

 

Regards,

Xiaoxin Sheng

Hi @Anonymous,

 

Thanks for your answer,

Do you have any idea to write a measure for this? Because i really don't no how to fix this in liveconnection

 

Thanks a lot

Anonymous
Not applicable

HI @miltenburger,

 

I'm not so sure if below measure formula can works in live mode, maybe you can try it:

 

Right Part =
VAR curretn_item =
    LASTNONBLANK ( Table[Column], [Column] )
RETURN
    PATHITEM ( SUBSTITUTE ( curretn_item, "\", "|" ), 2 )

 

 

Regards,

Xiaoxin Sheng

@miltenburger are you not able to create it in the source data? personally i dont know how you would do that if you doing it in a live connection.   when using live connection power bi expect you do do most of the modelling in the source data.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




It's probably an issue that it is a Live connection and not import. This is why FIND and SEARCH do not work.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
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.

Top Kudoed Authors