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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
PatCreator
Frequent Visitor

Matrix Table Headers Order

Hi, Im building a matrix table and I need it to look like the attached image.
I want to add a second header of values below the Year+Week header related to KPIs but I don't know how to build this type of Table.

PatCreator_0-1666301188972.png 

this are the filelds used.. I tried to order them in different ways but... nothings seems to order them as I need.

PatCreator_1-1666301345620.png

 

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @PatCreator ,

 

you can not achieve what you are looking for without using a little trick.

 

Create an unrelated table with two columns

Measure Name and Measure Order

Use the name of the measure/columns you are currently using in the Values bucket, and provide an index  to order the values of the name column accordingly.

 

Then you can create a measure like so:

switch measure=
var SelectedKPI = SELECTEDVALUE( 'unrelated table'[NameColumn] )
return
SWITCH(
SelectedKPI
, "name1" , [Measure1]
, "name2" , [Measure3]
, "name3" , [Measure3]
)

Maybe it is necessary that you create measures or internal calculations if the columns you are using in the values bucket are numeric columns and not measures

 

Hopefully, this provides an idea of how you can tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
TomMartens
Super User
Super User

Hey @PatCreator ,

 

please use onedrive, googledrive, or dropbox for the upload, and do not zip the file.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
TomMartens
Super User
Super User

Hey @PatCreator ,

 

share the link here in this thread.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

hi @TomMartens , this is the link with the pbi file zipped thanks for the support https://ln5.sync.com/dl/4c2684fd0/dkugzyvx-c2qe8gs4-vw6k5hb8-w3mk98xm 

TomMartens
Super User
Super User

Hey @PatCreator ,

 

you can not achieve what you are looking for without using a little trick.

 

Create an unrelated table with two columns

Measure Name and Measure Order

Use the name of the measure/columns you are currently using in the Values bucket, and provide an index  to order the values of the name column accordingly.

 

Then you can create a measure like so:

switch measure=
var SelectedKPI = SELECTEDVALUE( 'unrelated table'[NameColumn] )
return
SWITCH(
SelectedKPI
, "name1" , [Measure1]
, "name2" , [Measure3]
, "name3" , [Measure3]
)

Maybe it is necessary that you create measures or internal calculations if the columns you are using in the values bucket are numeric columns and not measures

 

Hopefully, this provides an idea of how you can tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi @TomMartens , Sorry for late response, I've been trying to do what you suggest, but its difficult, I'm still not able to do it right 😞

This is how main data looks like

PatCreator_0-1666985656871.png

what I did:

PatCreator_1-1666985815132.png

wold it be ok, if I share with you a link to view the pbi rep?

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.