Forum Discussion
Pfin
1 year agoFrequent Visitor
Power BI - Excel To Power BI - Report Style Help Needed
I'm trying to recreate a report in Power BI that has long lived in Excel for YEARS where the user can basically create the format that has been used. Any input on how to provide this same informatio...
Ashish_Mathur
1 year agoSuper User
Hi,
This M code works as well
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Manufacturer", type text}, {"Segment", type text}, {"Model", type text}, {"Price", Int64.Type}, {"Available Date", type date}}),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Changed Type", {{"Price", type text}, {"Available Date", type text}}, "en-IN"),{"Model", "Price", "Available Date"},Combiner.CombineTextByDelimiter("#(lf)", QuoteStyle.None),"Merged"),
#"Grouped Rows" = Table.Group(#"Merged Columns", {"Manufacturer", "Segment"}, {{"Count", each Text.Combine(_[Merged],"#(lf)-----------------#(lf)")}}),
#"Pivoted Column" = Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[Segment]), "Segment", "Count")
in
#"Pivoted Column"
Hope this helps.
- Pfin1 year agoFrequent Visitor
This is fantastic as well! Thank you for the reply and help!
- Ashish_Mathur1 year agoSuper User
You are welcome. If my previous reply helped, please mark that reply as Answer.