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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi! I have a power query which gets data from a table. These table containts specific columns which are called "Volume Third Party". Table is dynamic which means that the number of columns including columns which are called "Volume Third Party" can increase or decrease. I want to add costum column with the following formula (last column - sum range between "Volume Third Party" to last column). Between these range there are columns with the name "Volume Third Party_*different number*". I have attached screenshot to make it more clear:
After adding costum column it should add filter to last column and to column with custom function which would remove rows with 0 & blank values. Is it possible to do?
Current code:
let
Source = Excel.CurrentWorkbook(){[Name="SAPCrosstab1"]}[Content],
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Filtered Rows" = Table.SelectRows(#"Promoted Headers", each ([#""] <> "R001" and [#""] <> "R003") and ([_6] <> "#"))
in
#"Filtered Rows"
Solved! Go to Solution.
Without an example of your data and results, it's hard to tell exactly what you want, but this custom column formula should get you started.
[Last Column] -
List.Sum(
Record.FieldValues(
Record.SelectFields(_,
List.Select(
List.RemoveLastN(Record.FieldNames(_),1),
each Text.StartsWith(_,"Volume Third Party")))))
In the formula above, know that:
Adding a filter, or changing which columns to sum/subtract, should be easy for you to modify.
Without an example of your data and results, it's hard to tell exactly what you want, but this custom column formula should get you started.
[Last Column] -
List.Sum(
Record.FieldValues(
Record.SelectFields(_,
List.Select(
List.RemoveLastN(Record.FieldNames(_),1),
each Text.StartsWith(_,"Volume Third Party")))))
In the formula above, know that:
Adding a filter, or changing which columns to sum/subtract, should be easy for you to modify.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 20 | |
| 14 | |
| 11 | |
| 9 | |
| 8 |