Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
I'm using the text function "Text.PositionOfAny([Assistência], {"S"}, Occurrence.All)" to get the sequence of S from a string field.
This is the string field
"NNNNNNNNNSNNSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN"
This is the return of the function
List
Extract values and then add dash separator
9-12
How do I make this function start from 1, today it starts from 0, so my answer would be 10-13?
Solved! Go to Solution.
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each List.Transform(Text.PositionOf([Text], "S", Occurrence.All), each Number.From(_) + 1)),
#"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From), "-"), type text})
in
#"Extracted Values"
Hope this helps.
pls try this
Text.Combine(
List.Transform(
Text.PositionOfAny("W"&[Assistência], {"S"}, Occurrence.All), Text.From),
"-")Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each List.Transform(Text.PositionOf([Text], "S", Occurrence.All), each Number.From(_) + 1)),
#"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From), "-"), type text})
in
#"Extracted Values"
Hope this helps.
@Ashish_Mathur Thank you for your help,
The step where I do this validation I cannot call the source, in the previous step I make a line filter, as I adapted the source to start the previous step,
Solution
List.Transform(Text.PositionOf([Assistência], "S", Occurrence.All), each Number.From(_) + 1)
I cannot understand your message.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 59 | |
| 45 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 121 | |
| 116 | |
| 37 | |
| 34 | |
| 30 |