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
Hello,
I have this column :
DFS-PI1
DFS-PI2
01234
P393
BLABLABLA
And I want to create a column that extract the last number only if it starts with "DFS-PI", otherwise show null. The result would be:
1
2
null
null
null
I can't find a way to do that. Anyone can help me please?
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
In Power Query you would create a new column with the following calculation:
if
Text.StartsWith([yourColumnName], "DFS-PI")
then
Text.End([yourColumnName], 1)
else
null
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
In Power Query you would create a new column with the following calculation:
if
Text.StartsWith([yourColumnName], "DFS-PI")
then
Text.End([yourColumnName], 1)
else
null
Pete
Proud to be a Datanaut!
Hi @Anonymous
This should work:
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 |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 5 | |
| 2 |