Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hey,
I need assistance in removing "years" from the data output in a column. The data comes in labeled as..
1 Year
2 Year
3 Year etc,
I need it to just display a # like
1
2
3
4 and so on
I tried the text.replace and kept getting an error
Text.Replace([# of Years], {"Year", ""})
Thanks,
Solved! Go to Solution.
@thomas_coltrain
Please use the following
Year Number =
VAR String = Data[Year]
VAR NumberLength = SEARCH ( "Y", String, 1, 3 ) - 2
RETURN
LEFT ( String, NumberLength )
@thomas_coltrain
Please use the following
Year Number =
VAR String = Data[Year]
VAR NumberLength = SEARCH ( "Y", String, 1, 3 ) - 2
RETURN
LEFT ( String, NumberLength )
Fast service!! Thank you for the help!
@thomas_coltrain
You are posting in dax forum but seems you are looking for power quer solution. However this can be solved in dax. Are you intersted in dax solution?
Opps! Sure I don't mind if its in DAX
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |