Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
FCF
Helper IV
Helper IV

line chart start week

chart.GIF

 

 

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?

 

 

1 ACCEPTED SOLUTION

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



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


View solution in original post

15 REPLIES 15
richbenmintz
Solution Sage
Solution Sage

Hi @FCF,

You need a sort by column in your data model

Week LabelWeekOrder
311
322
........
3052

 

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!



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


i believe i have this but the line chart does not see week 31.19 as the first week.

sort.GIF

this is the layout of the page.

we have a margin $ value, a  sales  $  value, and a week#.

the fiscal  begins on week 31.19, year 2019 and ends on week 31.20 year2020 giving a  53 week year.

 

overview.GIF

Hi @FCF ,

 

Did you assign the [Order] Column as the sort by column of the [WK#] column?



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


hi

thanks for the response so quickly, 

and no, i am not sure how that is done.

Hi @FCF ,

 

select the [WK#] column in either the table or visuals view click the 'Sort By Column' In the Column Tools Ribbon and chose the order by column

richbenmintz_0-1597425463924.png

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!

 



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


no that does not work, i get this error.

sort error.GIF

Hi @FCF,

 

can you share the data in your date table?



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


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



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Spoiler
thanks your right, i was using [wk]  and it should have been [wk#], when i made the change it seems to have worked.
thanks for you help
ryan_mayu
Super User
Super User

@FCF 

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)

1.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




hi

the fiscal range is for two years, 

fiscal 20, and our current fiscal 21 which began Aug 2020

BA_Pete
Super User
Super 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



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




sort.GIF

 

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.

amitchandak
Super User
Super 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-Calend...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.