Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all, just like you can put a Row Total at the top of a Matrix, can you put Column Totals at the front of the matrix after the Row Headers? TIA
Solved! Go to Solution.
Hi @DPCCGF
We don't have this functionality as a format option, but there are some workarounds to achieve it.
Please refer to the linked video.
https://www.youtube.com/watch?v=VRUs0pWgsdE
If my answer was helpful please give me a Kudos and accept as a Solution.
Hi Ritaf1983 ,thanks for the quick reply, I'll add more.
Hi @DPCCGF ,
Regarding your question, are you planning to move the totals to this location?
Please follow these steps:
1.Use Power Query to duplicate your fact table, retaining only the fields used in 'Colums' in the matrix
Enter the following M code
let
Source = Excel.Workbook(File.Contents("C:\Users\v-zhouwenbin\Desktop\(1)2024.10.2.xlsx"), null, true),
Table_Sheet = Source{[Item="Table",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Table_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Type", type text}, {"Amount", Int64.Type}, {"Month", Int64.Type}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Type", "Amount"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Columns"),
TotalRow = #table({"Month"}, {{"Total"}}), //Replace 'Month' with your own column name.
Combined = Table.Combine({TotalRow, #"Removed Duplicates"}),
#"Added Index" = Table.AddIndexColumn(Combined, "Index", 1, 1, Int64.Type)
in
#"Added Index"
2.Creating table-to-table relationship
3.Sort by column
4.Use the following DAX expression to create a measure
Measure =
VAR _column = SELECTEDVALUE('Table(2)'[Month])
RETURN
IF(_column = "Total",CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Type])),SUM('Table'[Amount]))
5.Final output
Best Regards,
Wenbin Zhou
Hi @DPCCGF
We don't have this functionality as a format option, but there are some workarounds to achieve it.
Please refer to the linked video.
https://www.youtube.com/watch?v=VRUs0pWgsdE
If my answer was helpful please give me a Kudos and accept as a Solution.
RitaF983...........simple and easy. Thank you!
User | Count |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
52 | |
41 | |
39 | |
37 |