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.
Hi all,
Does anyone know how to extract the year from this text string? I trired "Text Extraction" and "Delimiter" but it is not coming out the way I want.
I want the year in one column but I am also showing "Gen".
Thank you for your help
Solved! Go to Solution.
Thank you but this solution works
List.RemoveNulls (
List.Transform (
Text.Split ( _[Campaign Name], "-" ),
each try Number.From ( _ ) otherwise null
)
){0}
Hi @ysherriff - you could try something like Text.Remove - PowerQuery M | Microsoft Learn or Text.Select - PowerQuery M | Microsoft Learn
Select = Text.Select( [Text] , {"0".."9"} )
Remove = Text.Remove( [Text] , {"a".."z", "A".."Z"})
Thank you but this solution works
List.RemoveNulls (
List.Transform (
Text.Split ( _[Campaign Name], "-" ),
each try Number.From ( _ ) otherwise null
)
){0}