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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
hi friends
i want to write a measure for create local/export category product using the product code
for example :
product code start with number 1 = local sales
product code start with number 2 = export
Solved! Go to Solution.
Hi @ahmadi1364 ,
Here are the steps you can follow:
1. Create calculated column.
Test =
IF(
VALUE( LEFT('Table'[product code],1))=1,"local sales",
IF(
VALUE(LEFT('Table'[product code],1))=2,"export",BLANK()))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @ahmadi1364 ,
Here are the steps you can follow:
1. Create calculated column.
Test =
IF(
VALUE( LEFT('Table'[product code],1))=1,"local sales",
IF(
VALUE(LEFT('Table'[product code],1))=2,"export",BLANK()))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 19 | |
| 12 | |
| 10 |