Forum Discussion
srinivas_fabric
1 year agoRegular Visitor
Matrix Visual: How to Expand Q1 into Jan, Feb, Mar + Q1 Total Using +/- Drill Option
Hello Power BI Experts, I'm using Power BI Version: 2.143.1204.0 64-bit (May, 2025). I'm working with a Matrix visual and want to implement a feature similar to Excel pivot tables: I want the Q1 co...
- 1 year ago
Thank you for reaching out to the Microsoft Fabric Forum Community.
Please find attached pbix file, it may help you.
If this information is helpful, please “Accept as solution” to assist other community members in resolving similar issues more efficiently.
Thank you.
Ashish_Excel
1 year agoSolution Supplier
Hi,
Run this M code in Power Query to transform your data into a proper dataset
let
Source = Csv.Document(File.Contents("C:\Users\Ashish Mathur\Desktop\Updated_KPI_Dashboard.csv"),[Delimiter=",", Columns=21, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Category", "KPI's Description", "2024 Actual", "2025 Target"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Attribute] <> "Q1" and [Attribute] <> "Q2" and [Attribute] <> "Q3" and [Attribute] <> "Q4" and not Text.Contains([Attribute], "YTD",Comparer.OrdinalIgnoreCase))),
#"Added Custom" = Table.AddColumn(#"Filtered Rows", "Year", each List.Transform(List.Select(Table.ColumnNames(#"Filtered Rows"), each Text.Contains(_,"Actual")),each Text.Remove(_,{"A".."Z","a".."z"}))),
#"Expanded Year" = Table.ExpandListColumn(#"Added Custom", "Year"),
#"Added Custom1" = Table.AddColumn(#"Expanded Year", "Date", each "1/"&[Attribute]&"/"&[Year], type date),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom1",{"Attribute", "Year"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"Category", type text}, {"KPI's Description", type text}, {"2024 Actual", type text}, {"2025 Target", type text}, {"Value", type number}, {"Date", type date}})
in
#"Changed Type"The revised data layout will be
Now create a Calendar table and write your measures.
Hope this helps.
srinivas_fabric
1 year agoRegular Visitor
Thank ypu for your response,Please send me the sample file.