Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I create this List as below from my data source and hope to add 'Total' value in a row which will be for 5G + LTE_M.
Then I could make below calculation for Total vs 5G or Total vs LTE_M.
Is there any Mcode I can forcely add up 'Total' value into automacically created List?
*there will be more unique value which is unknown now apart from 5G and LTE_M in the future so I cannot create a table manually.
my desired output is
1. Total
2. 5G
3. LTE_M
FYI,
let
Source = Table.Combine({#"TOSS service PO_master - Previous Backup Data", #"TOSS service PO_master - Current Weekly Data"}),
Frequency = Source[Frequency],
#"Removed Duplicates" = List.Distinct(Frequency)
in
#"Removed Duplicates"
Solved! Go to Solution.
This is based on your original query
let
Source = Table.Combine({#"TOSS service PO_master - Previous Backup Data", #"TOSS service PO_master - Current Weekly Data"}),
Frequency = Source[Frequency],
#"Removed Duplicates" = List.Distinct(Frequency),
#"Added Total row" = List.Combine({"Total"}, #"Removed Duplicates")
in
#"Added Total row"
+I've succeeded creating as below, just pls suggest if there is any better way.
let
Source = Table.Combine({#"TOSS service PO_master - Previous Backup Data", #"TOSS service PO_master - Current Weekly Data"}),
Frequency = Source[Frequency],
#"Removed Duplicates" = List.Distinct(Frequency),
#"Converted to Table" = Table.FromList(#"Removed Duplicates", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each "Total"),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Added Custom", {}, "Attribute", "Value"),
#"Removed Duplicates1" = Table.Distinct(#"Unpivoted Columns", {"Value"}),
#"Removed Columns" = Table.RemoveColumns(#"Removed Duplicates1",{"Attribute"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Value", "Frequency"}})
in
#"Renamed Columns"
This is based on your original query
let
Source = Table.Combine({#"TOSS service PO_master - Previous Backup Data", #"TOSS service PO_master - Current Weekly Data"}),
Frequency = Source[Frequency],
#"Removed Duplicates" = List.Distinct(Frequency),
#"Added Total row" = List.Combine({"Total"}, #"Removed Duplicates")
in
#"Added Total row"
Hi @Anonymous
Try this:
// Combine the text value "Total" with a distinct list of elements from the list "Frequency".
List.Combine(
{"Total"}, // A single-element list containing the text value "Total".
List.Distinct( // Remove duplicate elements from the list "Frequency".
Frequency // The list from which duplicates are removed.
)
)
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 62 | |
| 31 | |
| 26 | |
| 25 |