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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
RichFlorida
Helper IV
Helper IV

Matrix with Dynamic Column Heading

For the Matrix below, I would like the headings of each column to be dynamic! I would like it to change when the month/year changes.

Ex: if we are in Feb, 2023 the headings should be as illustrated below.

 

Any idea how to achieve this?

(currently each column calculation is an independent measure)

 

matrix.JPG

1 ACCEPTED SOLUTION

@RichFlorida 

 

Please check my sample here at the link. It is hard to explain in words detailedly, but I can tell what have I done concisely.

1. Create a table that contains all the possible dynamic values you wish to see (I created the table 'Dynamic header')

 

2. Create a calculated column in your raw data table, which is used to make a relationship between the raw data and the table in step 1 (For me, it is a single directional relationship from 'Dynamic header' to 'Earthquakes')

 

johnyip_0-1676537229052.png

 

3. Create a measure for the table in step 1, aiming to clone the exact value of the dynamic title column.

 

4. write yor measure. Yes, write it all in a single measure, unlike what you have done previously (different things in different measures). This is why I said it is an ordeal.

 

I have improvised something like this on my own and I still believe that is an ordeal if your measures to be used are complex.

 

johnyip_1-1676861911816.png

 

https://drive.google.com/file/d/16zun85AxSoGLqAVjum9knrqVetUnaFGN/view?usp=share_link

 

I hope you can make it if this dynamic title requirement is really necessary.

 



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

View solution in original post

7 REPLIES 7
lpriceFTW
Helper II
Helper II

@RichFlorida,

How has the solution been working for you so far? I am facing the same issue that you present in your question.

 

In my case, I am presenting a balance sheet matrix. Rows are account line items and the two dynamic columns each represent a month of financial activity totals. The user can compare both columns (months).

 

However, I need the header to display which month each of the columns is currently filtered to.

RichFlorida
Helper IV
Helper IV

thank you @johnyip  so much.

 

I will see if I could customize your code for my measures and incorporate in my dash.

RichFlorida
Helper IV
Helper IV

Thanks you @johnyip 

Click here for the sample file

 

Any help greatly appreciated!

RichFlorida
Helper IV
Helper IV

Thanks you @johnyip 

Click here for the sample file

 

Any help greatly appreciated!

Hi @RichFlorida , Welcome. Hope the sample file can help you in understanding the creative way to make the measures' name dynamic, and please accept that as the solution so others can look for assistance from your thread.



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

@RichFlorida 

 

Please check my sample here at the link. It is hard to explain in words detailedly, but I can tell what have I done concisely.

1. Create a table that contains all the possible dynamic values you wish to see (I created the table 'Dynamic header')

 

2. Create a calculated column in your raw data table, which is used to make a relationship between the raw data and the table in step 1 (For me, it is a single directional relationship from 'Dynamic header' to 'Earthquakes')

 

johnyip_0-1676537229052.png

 

3. Create a measure for the table in step 1, aiming to clone the exact value of the dynamic title column.

 

4. write yor measure. Yes, write it all in a single measure, unlike what you have done previously (different things in different measures). This is why I said it is an ordeal.

 

I have improvised something like this on my own and I still believe that is an ordeal if your measures to be used are complex.

 

johnyip_1-1676861911816.png

 

https://drive.google.com/file/d/16zun85AxSoGLqAVjum9knrqVetUnaFGN/view?usp=share_link

 

I hope you can make it if this dynamic title requirement is really necessary.

 



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
johnyip
Super User
Super User

It is not possible using measures directly, but if you can figure out the way of doing the calculation correctly by using CALCULATED TABLE and MEASURE and relationship, you MAY achieve that, given you can pass the ordeal of DAX.

 

You can provide a sample file, with the data structure you are using, and I can see if this is possible (without making the functioning calculated columns) to build a template with dymanic column names.



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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