Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Dear Community,
I hope you can help me. I need to create a calculated column to identyfy the lines with a 6 digit number in the text.
Is there a function to identify the notifictn(unic number) that has a 6 digit number in the material text(placed at different positions and with different 6 digit numbers)?
Hi @gjelstrup
Please test the following. I did not have the chance to test from my side.
6 digit number =
VAR String = 'Table'[Material Description]
VAR Items =
SUBSTITUTE ( String, " ", "|" )
VAR Length1 =
COALESCE ( PATHLENGTH ( Items ), 1 )
VAR T1 =
GENERATESERIES ( 1, Length1, 1 )
VAR T2 =
SELECTCOLUMNS ( T1, "@Item1", PATHITEM ( Items, [Value] ) )
VAR T3 =
FILTER (
T2,
VAR Item1 =
COALESCE ( [@Item1], 1 )
VAR Length2 =
LEN ( Item1 )
VAR T4 =
GENERATESERIES ( 1, Length2, 1 )
VAR T5 =
SELECTCOLUMNS ( T4, "@Item2", MID ( Item1, 1, [Value] ) )
VAR T6 =
GENERATESERIES ( 0, 10, 1 )
RETURN
LEN ( Item1 ) = 6
&& ISEMPTY ( EXCEPT ( T5, T6 ) )
)
RETURN
MAXX ( T3, [@Item] )
Hi @tamerj1 I really apprecialte your help. Thank you.
I cannot make it Work. I think that I need to change what is marked by ned in below scrren dump, however, I am not certain what I need to change it to.
Yes, this is a typo mistake, the price paid for not testing. It should be [@Item2]
Apologies again. It should be [@Item1]
Sorry, im really new to this BI stuff, where are you putting this code, in a measure or a new column?
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
11 | |
10 | |
8 | |
7 | |
7 |