Forum Discussion
Convert data from monthly format into weekly
I have my data in a monthly format. But I want to convert it into a weekly format.
My column data type is text currently. And I'm unable to convert it into date data type.
Expected Output :
Sr.No. Customer Code Jan23(Week1) Jan23(Week2) Jan23(Week3) Jan23(Week4) Jan23(Week5)
Every month should divide into weeks.
I don't have a date column.
Can anyone help?
1) in power query divided sales into daily sales and created a date in the same place
2) I created a calendar, if you don't like this calendar you can create your own
23 Replies
- AnonymousNot applicable
Hi Anonymous ,
What's your expected result? Do you want to divide the month column into multiple (4-5) weekly columns? For example, for the column [Jan-'23], do you want to get [week1],[week2],[week3],[week4] and [week5]? And how to assign the values to these weekly column? Could you please provide some sample data with Text format and the expected result with the specific examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- AnonymousNot applicable
Every month should be divided into weeks. And value should assign equally each week.
Sr.No Code Jan23
Week1Jan23
Week2Jan23
Week3Jan23
Week4Jan23
Week5Total 1 575 40 40 40 40 40 200 2
- AhmedxSuper User
1) in power query divided sales into daily sales and created a date in the same place
2) I created a calendar, if you don't like this calendar you can create your own- AnonymousNot applicable
Great. You did fantastic work. But I have got an error.
"Column 'Value' in the table cannot be found or may not be used in this expression. Column 'Value' in the table cannot be found or may not be used in this expression. Column 'Value' in the table cannot be found or may not be used in this expression."- AhmedxSuper User
in this version I made a small change, removed the weekend days
https://1drv.ms/u/s!AiUZ0Ws7G26RhxQzx1qDV_e2UulW?e=Dj5M3M
- AnonymousNot applicable
Sr.No Code Jan23 Feb23 March23 April23 May23 Total 1 575 200 100 50 60 80 490 2 125 40 30 46 70 90 286 I have data in this monthly format.I want to convert it into weekly format without a date column.
- Ashish_MathurSuper User
Hi,
Remove the Total column. Select the first 2 columns, right click and click on "Unpivot Other Columns". Rename the Attribute column to Dae and ensure that this column has the Data Type of Date. Create a Calendar Table with calculated column formulas for Year, Month name, Month number and Week number. Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table. To your visual, drag the Month name and Week number column from the Calendar Table.
Hope this helps.
- AnonymousNot applicable
I don't have Date column in data.