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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
There are values in my column that are both numeric and alphabetical. If the first 4 characters are numbers, I must separate them. If not, I must leave the value alone.
Please consider the following, for instance:
1111 Grape | Grape |
9999 Apple | Apple |
8888 18 Mango | 18 Mango |
7777 Orange 10 | Orange 10 |
Strawberry Fruit | Strawberry Fruit |
Please advise?
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
Expected result CC =
VAR _length =
LEN ( Data[Column A] )
RETURN
IF (
NOT ISERROR ( INT ( LEFT ( Data[Column A], 4 ) ) ),
RIGHT ( Data[Column A], _length - 5 ),
Data[Column A]
)
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
Expected result CC =
VAR _length =
LEN ( Data[Column A] )
RETURN
IF (
NOT ISERROR ( INT ( LEFT ( Data[Column A], 4 ) ) ),
RIGHT ( Data[Column A], _length - 5 ),
Data[Column A]
)
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |