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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Trim the first 7 characters from value

I'm using direct query to trim the first 7 characters from a column that contain the character "/" e.g.  Period 1 2018/2019
 
This is what I have come up with so far however it keeps giving me an error that ISERROR cannot be recognized for DAX expressions around Direct Query, is there another way around this?
 
CustomColumn = IF(ISERROR(SEARCH("/", 'looker_views lkr_Questionnaire'[Questionnaire_Title_Secondary])
    ),
    "/",
    LEFT('looker_views lkr_Questionnaire'[Questionnaire_Title_Secondary], 7)
)
1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Anonymous,

 

Try to modify your measure as below:

 

CustomColumn = IF((SEARCH("/", 'looker_views lkr_Questionnaire'[Questionnaire_Title_Secondary],,BLANK())=BLANK()
    ,
    "/",
    LEFT('looker_views lkr_Questionnaire'[Questionnaire_Title_Secondary], 7)
)

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @Anonymous,

 

Try to modify your measure as below:

 

CustomColumn = IF((SEARCH("/", 'looker_views lkr_Questionnaire'[Questionnaire_Title_Secondary],,BLANK())=BLANK()
    ,
    "/",
    LEFT('looker_views lkr_Questionnaire'[Questionnaire_Title_Secondary], 7)
)

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@Anonymous , there quite a few restrictions what you can do in direct query terms of column

refer few at the end. You have to change it

https://radacad.com/directquery-connection-in-power-bi-how-does-it-work-limitations-and-advantages

 

What you are trying to achieve here

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.