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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
NickMcDermaid
Frequent Visitor

Showing YearWeek as Week in matrix column

I have a matrix which shows week code in the columns. This is in this format:

 

    202106  202107  202108

 

Due to space constraints I want to truncate the year and show it like this:

 

    06 07 08

 

I do have a column with data in this format (week number), but I can't use it for two reasons:

 

* 202106 and 202006 aggregate together into one value

* It does not order correctly (I cannot apply the weekcode as an order by to the week due to cardinality)

 

For example my order should be like this:

28 29 30 ..... 50  51 52 01 02 03 04

 

 

not this:

 

01  02  03  04  28  29 30

 

 

Ideas I have tried:

 

A. Nesting years into the columns (you can't nest columns on a matrix, only rows)

B. Applying a funky custom numeric format to replace the first four numbers with nothing (can't get it to work)

C. Using the actual date column with custom format ww (pretty sure this isn't supported in Power BI)

 

I effectively need a "label" against a "code" but it doesn't look like this is possible as the label is closely linked with the actual underlying data

 

Any ideas?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@NickMcDermaid , I think the first one should work.

 

Take both Year and Week on Column. And use reverse square Y sign( for columns, if needed) and expand it, and save  

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
NickMcDermaid
Frequent Visitor

Thanks! It worked! I was a little puzzled by your comment but let me explain it in detail for anyone else.

It turns out you can nest things in columns.

1. Nest "Year"  above "Week" in columns
2. You only see Year in the columns
3. Press the "expand all down one level in the hierarchy" button (yes it look like an upside down square Y with arrows on it)


 

amitchandak
Super User
Super User

@NickMcDermaid , I think the first one should work.

 

Take both Year and Week on Column. And use reverse square Y sign( for columns, if needed) and expand it, and save  

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.