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

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.

Reply
Anonymous
Not applicable

Weekly data

Hi all,

 

I have sales data that is recorded weekly, which means the data i receive come in like this:

2017 Week 1 ....... (sales amount)........ item

2017 Week 1......... (sales amount) ..... item

2017 Week 2........ Sales amount).......Item

 

all the way to 2018 current week.

 

If i try show a simple graph in Power BI it just randomizes the dates. I tried to click the sort button in the top right corner of the graph and sort by week.  Doesn't work... i tried to sort inside the table first by year and then by week, doesn't work.

 

I tried to split the first column into two so i have for example year: 2017 and week: 1 in second column.

2017....... 1.........sales amount........item..

etc...

 

I think i need a calendar table that somehow can work with only year and week, and i really cant figure it out.

A lot of people ask me "dont you have daily sales".. and the answer is no..

 

 

hope someone have tried to work with weekly data and have a solution for this.

 

 

2 REPLIES 2
Anonymous
Not applicable

Not quite understand your question, but after you split the first column into two, did you get a week column with the value such as week 1, week 2, week 3 ... week n? If it is, you can try the following method to sort the week.

 

You can add another sorting item in the table. Below is an example regarding how to sort weeks.  

For the Weeksort, use number for ordering and make sure the column type of Weeksort is Number in Power B. Select the Week column, click Modeling > Sort by Column and then choose sort by Weeksort. After that, you should get the order to sort by (Week 1, Week 2 etc)

 

2018-03-19_9-04-16.png

 

 

 

 

MFelix
Super User
Super User

Hi @Anonymous,

 

Not really sure if I unbderstand your request but try to add a column to your data that is conpose by Year and Week (two numbers) looks like this:

 

201701

201702

...

201819

 

Then just sort your initial column by this new one and your charts should look fine.

 

If you want further assistance please provide a better sample of your information and expected results.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.