Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Trying to show last 3 years sales and have a fiscal calendar created that has the first month being fiscal month 1 and Oct as month 12. When creating the line chart, it is showing January as the first month for the beginning of the sales period.
I have sorted month name by the fiscal month ( which is numerical 1 = Nov, 2 = Dec, 3 = Jan, etc.....) by highliting the field, then choosing sort by column to sort the month name by the fiscal month number.
data table info:::
let
StartDate = #date(2015,1,1),
YearsToGenerate=10,
FiscalYearStartMonth=11,
BaseList=List.Dates(
StartDate,
YearsToGenerate*366,
#duration(1,0,0,0)),
#"Converted to Table" = Table.FromList(BaseList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}}),
#"Inserted Year" = Table.AddColumn(#"Changed Type", "Year", each Date.Year([Date]), Int64.Type),
#"Inserted Month" = Table.AddColumn(#"Inserted Year", "Month", each Date.Month([Date]), Int64.Type),
#"Inserted Quarter" = Table.AddColumn(#"Inserted Month", "Quarter", each Date.QuarterOfYear([Date]), Int64.Type),
#"Inserted Week of Year" = Table.AddColumn(#"Inserted Quarter", "Week of Year", each Date.WeekOfYear([Date]), Int64.Type),
#"Inserted Month Name" = Table.AddColumn(#"Inserted Week of Year", "Month Name", each Date.MonthName([Date]), type text),
#"Reordered Columns" = Table.ReorderColumns(#"Inserted Month Name",{"Date", "Year", "Quarter", "Month", "Month Name", "Week of Year"}),
#"Inserted Day" = Table.AddColumn(#"Reordered Columns", "Day", each Date.Day([Date]), Int64.Type),
#"Inserted Day of Week" = Table.AddColumn(#"Inserted Day", "Day of Week", each Date.DayOfWeek([Date]), Int64.Type),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Day of Week",{"Day of Week"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Fiscal Date", each Date.AddMonths([Date],13-FiscalYearStartMonth)),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Fiscal Date", type date}}),
#"Inserted Year1" = Table.AddColumn(#"Changed Type1", "Year.1", each Date.Year([Fiscal Date]), Int64.Type),
#"Renamed Columns1" = Table.RenameColumns(#"Inserted Year1",{{"Year.1", "Fiscal Year"}}),
#"Inserted Quarter1" = Table.AddColumn(#"Renamed Columns1", "Quarter.1", each Date.QuarterOfYear([Fiscal Date]), Int64.Type),
#"Renamed Columns2" = Table.RenameColumns(#"Inserted Quarter1",{{"Quarter.1", "Fiscal Quarter"}}),
#"Inserted Month1" = Table.AddColumn(#"Renamed Columns2", "Month.1", each Date.Month([Fiscal Date]), Int64.Type),
#"Renamed Columns3" = Table.RenameColumns(#"Inserted Month1",{{"Month.1", "Fiscal Month"}}),
#"Inserted Week of Year1" = Table.AddColumn(#"Renamed Columns3", "Week of Year.1", each Date.WeekOfYear([Fiscal Date]), Int64.Type),
#"Renamed Columns4" = Table.RenameColumns(#"Inserted Week of Year1",{{"Week of Year.1", "Fiscal Week"}}),
#"Removed Columns1" = Table.RemoveColumns(#"Renamed Columns4",{"Fiscal Date"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns1", each true),
#"Changed Type2" = Table.TransformColumnTypes(#"Filtered Rows",{{"Date", type date}}),
#"Renamed Columns5" = Table.RenameColumns(#"Changed Type2",{{"Month Name", "Fiscal Month Name"}, {"Fiscal Month", "Fiscal Month Number"}})
in
#"Renamed Columns5"
>> I know the overall functionality of the data table works because another test visual I have been using to figure this out shows data from Nov1 to Oct 31, but only monthly totals, not a cumulative sum.
i only know a few power query functions and i probably didn't understand what your need is and where the problem lies.
Anyway this is my second chart.
I saw that it is possible to sort by the values of a column, so I created a column with the values 1,2,3 ... 12 associated with nov, dec, gen, ... oct.
I colored this additional column so that it doesn't show and this is the result:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
28 | |
27 | |
22 | |
14 | |
10 |
User | Count |
---|---|
23 | |
21 | |
17 | |
10 | |
9 |