Forum Discussion
line chart start week
Hi our fiscal year begins in week 31 of 2019 and end in week 30 of 2020. how can i set the line chart to begin at week 31 2019?
Hi FCF,
you are trying to order the [wk#], not the [wk] field, that being said, the error you are receiving means that the order column and the column being ordered do not share the same cardinality, the relationship between the column to be sorted and the sorting column must be 1 to 1
15 Replies
- ryan_mayuSuper User
how many years of data that you want to display?
if only one year,you can create a new week num and put it to x-aisx.
Column = if('Table'[Date]<date(2019,7,28),blank(),int(('Table'[Date]-date(2019,7,28))/7)+1)- FCFHelper IV
hi
the fiscal range is for two years,
fiscal 20, and our current fiscal 21 which began Aug 2020
- amitchandakSuper User
FCF , In date table, Create the start of the year using startofyearfunction and then create the day of the year by subtracting date from it
You can sort date on that
refer example of custom year at https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441
- BA_PeteSuper User
Hi FCF ,
There's a few options here, but the best way to do it is to set up a calendar table that contains your week numbers. Within this calendar table you would have a column that contains Fiscal Weeks (1-52/53 in line with your Fiscal Year). In the data model, you can select the Week Number column, go to Sort By on the ribbon, then select the Fiscal Weeks column. As your Fiscal Week column runs from 1-52 with your Fiscal Year, the Week column will sort s 31-30 for each Fiscal Year.
Pete
- FCFHelper IV
hi thanks for your help, i do have a calendar table, with an order colum. i have set week 31.19 as 1, week 32 as 2 and so on.
how can i use this so the line chart display week 31.19 as the first week.
- richbenmintzResident Rockstar
Hi FCF,
You need a sort by column in your data model
Week Label WeekOrder 31 1 32 2 ..... ... 30 52 Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!- FCFHelper IV
i believe i have this but the line chart does not see week 31.19 as the first week.
- richbenmintzResident Rockstar