Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a simple bar chart displaying counts by month. It is filtered by relative dates "is in the next 1 year," but it starts with January instead of October (today). Any suggestions?
Solved! Go to Solution.
The easiest way to solve is, in your Date table, create a column "Month Year" or something like that that has the Month and the Year. Then use that field in your bar chart.
You'll also need to create a MonthYearSort column that will get the Month Year column sorted properly (use the Sort By Column feature).
Here's the DAX:
MonthYear = FORMAT('Date'[Date], "MMM yyyy")
MonthYearSort = FORMAT('Date'[Date], "yyyyMM")
Eric
First, use the month year and check. Is sorting working?
Also is this column created by you or generated by power bi hierarchy?
I made the date table. It consists of a column of unique dates representing the underlying data table and then columns for the corresponding day, month and year.
I am using the Date column in the bar chart. I've tried using it as both the date hierarchy and just the date and various combinations of the month and month and year in the date hierarchy. If I set it as date instead of date hierarchy, I can get close. The bar chart now starts at the right time, but it splits the months into two bars. Maybe I can fix that with some formatting help.
The easiest way to solve is, in your Date table, create a column "Month Year" or something like that that has the Month and the Year. Then use that field in your bar chart.
You'll also need to create a MonthYearSort column that will get the Month Year column sorted properly (use the Sort By Column feature).
Here's the DAX:
MonthYear = FORMAT('Date'[Date], "MMM yyyy")
MonthYearSort = FORMAT('Date'[Date], "yyyyMM")
Eric
Can you please share us the PBIX file with the sample data with the current and expected results.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |