Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello Power BI community,
Beginner in Power BI and former user of Pivot table in excel, I am having a file with component yearly volume and vehicle yearly volume column (please see picture). Power BI recognize volumes numbers but not the yearly date of component / vehicle.
I would like to create a chart with X axis years, Y axis Volumes of vehicle and series for the car nameplates.
I would also need to have component volume Y axis on a second chart.
Below you can see Series & X axis are revert as date is not recognize by Power BI :
In Excel I was usually switching date X& Y but here I imagine there is a smarter way to do it via Power query ?
Any pro tips to make this more smart and easy ?
Thanks a lot for reading and your precious help !
Clement
Solved! Go to Solution.
Hi @ClementA ,
You could refer to my sample for details
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIGYjMgNoJicygNkktUitWJhsuYArEJFJtCdYFUJYFVwURh5plBVVpCVSUrxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"C Volumn 2012" = _t, #"C Volumn 2013" = _t, #"C Volumn 2014" = _t, #"C Volumn 2015" = _t, #"R Volumn 2012" = _t, #"R Volumn 2013" = _t, #"R Volumn 2014" = _t, #"R Volumn 2015" = _t, name = _t]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"name"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Attribute.1", "Attribute.2", "Attribute.3"}),
#"Removed Columns" = Table.RemoveColumns(#"Split Column by Delimiter",{"Attribute.2"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Attribute.1", "type"}, {"Attribute.3", "date"}})
in
#"Renamed Columns"
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ClementA ,
You could refer to my sample for details
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIGYjMgNoJicygNkktUitWJhsuYArEJFJtCdYFUJYFVwURh5plBVVpCVSUrxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"C Volumn 2012" = _t, #"C Volumn 2013" = _t, #"C Volumn 2014" = _t, #"C Volumn 2015" = _t, #"R Volumn 2012" = _t, #"R Volumn 2013" = _t, #"R Volumn 2014" = _t, #"R Volumn 2015" = _t, name = _t]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"name"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Attribute.1", "Attribute.2", "Attribute.3"}),
#"Removed Columns" = Table.RemoveColumns(#"Split Column by Delimiter",{"Attribute.2"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Attribute.1", "type"}, {"Attribute.3", "date"}})
in
#"Renamed Columns"
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Zoe,
Awesome, looking at your example file, I managed to get the steps, unpivoting then fractioning
Thanks a lot works exactly how I was looking for...:) !
@ClementA , you might to unpivot twice and split column to get year
https://kohera.be/blog/power-bi/how-to-unpivot-twice/
Hi @amitchandak,
Unpivot only the yearly volume column to lines ? and then split the title ?
Tried unpivot vehicle & component volume once where I hand up with this :
Should I then re unpivot it ?
Thank you,
Clément
Hi @amitchandak !
Thanks a lot for your proposal, I was trying single unpivot, let met work on it and confirm you 🙂 !
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |