This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I want to be able to split a column by 2 parameters - one being the delimiting character, the other being the number of delimiters or columns to create. I'm creating a report template for use across different Clients. They'll have different naming conventions for Campaign Names, with different delimiters and different numbers of delimiters. I want to use parameters to make the set up easy when switching to other Clients.
I'm able to split a column by the character by amending the M Language after it's been split, as follows:
Table.SplitColumn(#"Added Data Source", "Taxonomy Field", Splitter.SplitTextByDelimiter(#"Taxonomy: CM360 Campaign Name - Delimiter", QuoteStyle.Csv), {"Taxonomy Field.1", "Taxonomy Field.2", "Taxonomy Field.3", "Taxonomy Field.4", "Taxonomy Field.5"})However, I would like to be able to pass a parameter that tell Power Query how many columns to create. Can you tell me if this is possible? I can't see how to do it from the above code.
Thanks,
Mark
Solved! Go to Solution.
Replace this
{"Taxonomy Field.1", "Taxonomy Field.2", "Taxonomy Field.3", "Taxonomy Field.4", "Taxonomy Field.5"}
with (where Param is your parameter)
List.Transform({1..Param}, each "Taxonomy Field."&Text.From(_))
@Vijay_A_Verma actually, I have one addition I'd like to make.
When it's splitting my columns by 4 delimiters, if there is a fifth, I'd like to see that in the final column. But at the moment it's only creating 4 columns and removing anything beyond the fourth.
Would it be possible to amend the Query to allow everything past the fourth delimiter to appear in the final column?
Thanks,
Mark
Replace this
{"Taxonomy Field.1", "Taxonomy Field.2", "Taxonomy Field.3", "Taxonomy Field.4", "Taxonomy Field.5"}
with (where Param is your parameter)
List.Transform({1..Param}, each "Taxonomy Field."&Text.From(_))
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |