Forum Discussion
MorningSwim
1 year agoRegular Visitor
How to Sort Bar Chart by Month Number from Live Query but Not Show On Chart
I have the following chart which I'm sorting by axis (via the ellipsis menu of the visualization) using a calculated column that gives me the month number: I don't want to show the month nu...
kpost
Solution Sage
1 year agoCreate a Month and Year column like this:
Month_And_Year = FORMAT([Date], "mmm yyyy")
Then create a separate month and year column you will use to SORT it, make sure to format this one as a whole number rather than text.
year_month = FORMAT([date], "yyyymm")
then use Month_And_Year in your visual on the X axis.
Best practice is to do this in a Date Dimension table that has an active relationship to other tables on the date field.
///Mediocre Power BI Advice, but it's free///
MorningSwim
1 year agoRegular Visitor
I created a date table and made a relationship between by transaction table and the date table using the respective date fields. I clicked in the Data pane of power bi desktop the Year Month field to bring up the "Column tools" tab in the ribbon, and proceeded to sort on the Year Month field. The visualization refreshed but it didn't sort. If I click the ellipsis on the bar chart itself, it seems to always want to sort on one of the X-axis fields, and I can't uncheck it.