Forum Discussion
Sagejah9
4 years agoHelper III
Extract the number before the string days
Hi, I am trying to extract the number before days from the string 2 days or 1.5 days. How can I do so using DAX ?
Much easier to do that within the query editor with Text.BeforeDelimiter([YourColumn], " Days"). But here is an expression to do it with a DAX column. Replace Days[Days] with your actual Table[Column]
JustNumber = Left(Days[Days], SEARCH(" d", Days[Days],1,0))Pat
2 Replies
- mahoneypatMicrosoft Employee
Much easier to do that within the query editor with Text.BeforeDelimiter([YourColumn], " Days"). But here is an expression to do it with a DAX column. Replace Days[Days] with your actual Table[Column]
JustNumber = Left(Days[Days], SEARCH(" d", Days[Days],1,0))Pat
- CNENFRNLCommunity Champion