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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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  

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  

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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