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.
Hopefully a fairly simple question. For a project I am working on, I need to create a line chart with months being the x-axis, but I need it to start with October and run through Septmber to represent our businesse's fiscal year. How can this be done?
Solved! Go to Solution.
It is a simple solution for this. In the modelling ribbon of PBI Desktop, there is a "Sort by column"-button. Say you have date table, and in that table you have a column with the month name, e.g. January, February,...
The only thing you might be missing is how the months should be ordered. You could use the "Enter data"-functionality found in the home ribbon of PBI Desktop to type in month name and the order of the month. Then from your date table create a new column which is a lookup to this manually entered table to get the month sorting. Select you month name column in the date table and sort it by the new column in the date table.
Or you can use a little dax like this in your date table:
MonthNumberFiscal = IF ( MONTH ( vDate[Date] ) < 10; DATEDIFF ( DATE ( YEAR ( vDate[Date] ) - 1; 10; 1 ); STARTOFMONTH ( vDate[Date] ); MONTH ); DATEDIFF ( DATE ( YEAR ( vDate[Date] ); 10; 1 ); STARTOFMONTH ( vDate[Date] ); MONTH ) ) + 1
her as an example: report
hi, @Anonymous
You could use Sort By column in power bi to get it.
Use your fiscal [year-month] column as the "By column", If there is no [year-month] column in the table, just add it manually.
https://radacad.com/sort-by-column-in-power-bi
Best Regards,
Lin
It is a simple solution for this. In the modelling ribbon of PBI Desktop, there is a "Sort by column"-button. Say you have date table, and in that table you have a column with the month name, e.g. January, February,...
The only thing you might be missing is how the months should be ordered. You could use the "Enter data"-functionality found in the home ribbon of PBI Desktop to type in month name and the order of the month. Then from your date table create a new column which is a lookup to this manually entered table to get the month sorting. Select you month name column in the date table and sort it by the new column in the date table.
Or you can use a little dax like this in your date table:
MonthNumberFiscal = IF ( MONTH ( vDate[Date] ) < 10; DATEDIFF ( DATE ( YEAR ( vDate[Date] ) - 1; 10; 1 ); STARTOFMONTH ( vDate[Date] ); MONTH ); DATEDIFF ( DATE ( YEAR ( vDate[Date] ); 10; 1 ); STARTOFMONTH ( vDate[Date] ); MONTH ) ) + 1
her as an example: report
here is one example: example
but excatly how to do it will depend on your data and desired output. Do you have data for more than one fiscal year? Should your slicers have values like 2017/2018, 2018/2019, ...? Should the labels be Oct, Nov,....,Sep or should they be Oct-18, Nov-18,..,Jan-19,...Sep-19?
There is one small issue to be aware of. The column you use for the lookup can not be sorted by the column resulting from the lookup.
br,
S
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 |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
139 | |
100 | |
95 | |
85 | |
63 |