cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

how to work with weekly or monthly data?

How can i work with this kind of data? Monthly or weekly data.

 

Power BI wont recognize the months or weeks as date or date/time or anything meaningful.

 

I tried to look at videos and threads, but i cant seem to find a decent article or video that covers working with weekly or monthly data in Power BI. 

 

 

cap1.PNGcap2.PNGcap3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Floriankx Established Member
Established Member

Re: how to work with weekly or monthly data?

Hello, 

 

for Monthly Data you have two possibilities depending if your raw data changes from time to time or not.

Easiest Way would be a calculated column

SWITCH(Table1(Month)
  'January' 1,
  'February' 2,
  'March' 3,
  'April' 4,
  'May' 5,
  'June' 6,
  'July' 7,
  'August' 8,
  'September' 9,
  'October' 10,
  'November' 11,
  'December' 12,)

Then you have to sort your Month by your new caculated month column table.

sortbycolumn_8

 

Alternatively you could built a table with MonthName and MonthNumber and relate Month and MonthName. If you then add MonthName from MonthTable to your chart it should work as well. MonthName has to be sorted by MonthNumber.

 

For weeks you can add a Calculated Column as well.

RIGHT(Table2[week],Len(Table2[week])-6)

Sort Week by WeekNumber and everything should be fine.

1 REPLY 1
Floriankx Established Member
Established Member

Re: how to work with weekly or monthly data?

Hello, 

 

for Monthly Data you have two possibilities depending if your raw data changes from time to time or not.

Easiest Way would be a calculated column

SWITCH(Table1(Month)
  'January' 1,
  'February' 2,
  'March' 3,
  'April' 4,
  'May' 5,
  'June' 6,
  'July' 7,
  'August' 8,
  'September' 9,
  'October' 10,
  'November' 11,
  'December' 12,)

Then you have to sort your Month by your new caculated month column table.

sortbycolumn_8

 

Alternatively you could built a table with MonthName and MonthNumber and relate Month and MonthName. If you then add MonthName from MonthTable to your chart it should work as well. MonthName has to be sorted by MonthNumber.

 

For weeks you can add a Calculated Column as well.

RIGHT(Table2[week],Len(Table2[week])-6)

Sort Week by WeekNumber and everything should be fine.