Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello all, I have just started using PBi. I have a chart in Excel which shows two data values, the month and the population, it looks like this:
The way I acheive this is simply expanding the data selection for x-axis to include both, month and population columns, which are adjecent to each other. Is there any way I can do the same in PBi?
Solved! Go to Solution.
Hi @Anonymous ,
You could try to add two field in chart like below and create month date column by M code , then you could set sort by month date column.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8krM0zW0VNJR0sizNTS11ASyDPRMzZRidaKV3FKTkOQsoHIWYDnfxCKEnJkxVM4cLOdYgCRnAtNnBNVXiWSmKVTOECznVYrkFjMDqJwxVC4HSQ6mTyk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Month = _t, Population = _t, Rate = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{ {"Population", type text}, {"Rate", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Month date", each "01-"&[Month]),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Month date", type date}})
in
#"Changed Type1"
Or you also could create a calculated column like below , then set sort by like above image
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.
Hello all,
I apologize I was not very clear in the original post. I hope the below explanation helps:
I would like to make a PBi run-chart providing information on the following three columns:
Where the “Month” and “Population” would be shown on X-Axis (horizontal), as shown in the below diagram:
The way I achieve this in Excel is I select both, Month and Population, columns in the “Horizontal (Category) Axis Labels”, as shown below:
My question is, is this something that can be done in PBi? I don’t really want to plot the (n=__) values on a secondary axis.
I hope this makes is a little more clear what I am after.
I appreciate your previous responses!
Thank you,
Drcvg4.
Hi @Anonymous ,
You could try to add two field in chart like below and create month date column by M code , then you could set sort by month date column.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8krM0zW0VNJR0sizNTS11ASyDPRMzZRidaKV3FKTkOQsoHIWYDnfxCKEnJkxVM4cLOdYgCRnAtNnBNVXiWSmKVTOECznVYrkFjMDqJwxVC4HSQ6mTyk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Month = _t, Population = _t, Rate = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{ {"Population", type text}, {"Rate", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Month date", each "01-"&[Month]),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Month date", type date}})
in
#"Changed Type1"
Or you also could create a calculated column like below , then set sort by like above image
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 @Anonymous ,
I am not clear about your requirement, did you want to show two columns in the same axis? If so , I think you could try to create a calculated column to combine two column into the same column. If you want to show it in two rows, you could try to use Matrix to achieve this goal. So if possible could you please inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
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.
Thank you for your response. I have replied to the original thread with a more detailed explanation to make it more clear.
You can create a custom, adhoc hierarchy for an x-axis in Power BI and then use drilldown with concantenated labels. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.