Forum Discussion
Take text after a delimiter, DirectQuery
- 7 years ago
Hey,
maybe you can add a calculated column to your table like so:
Column = var theText = 'Table1'[aname] var thePosition = FIND("\",theText,1,0) return MID(theText,thePosition + 1,LEN(theText)-thePosition)then you can use the new column also as a slicer.
The DAX for a measure will look like this. it's a little bit more verbose to make sure that a single value of the column with the name is present:Measure = IF(HASONEVALUE(Table1[aname]) ,var theText = FIRSTNONBLANK('Table1'[aname],0) var thePosition = FIND("\",theText,1,0) return MID(theText,thePosition + 1,LEN(theText)-thePosition) )This is my testdata :-)
Regards,
Tom
That works great, thank you!
Hey Anonymous ,
I'm a little confused, as your latest post sounds like none ot the provided solutions will work for, but nevertheless you accepted my post as an answer, can you place post if there is still an issue?
If this is the case, please provide the DAX that your are using.
Regards,
Tom
- Anonymous7 years agoNot applicable
TomMartens Apologies! I responded to the incorrect post. Your solution worked. I have corrected my replies.
Thanks again!
MCKery
- TomMartens7 years ago
Super User
Hey,
great to hear that your problem has been solved :-)
Regards,
Tom