Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
12 | |
10 | |
10 | |
8 |
User | Count |
---|---|
16 | |
15 | |
15 | |
12 | |
10 |