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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II
Helper II

Create Matrix with Metric as a Column header

Hello Everyone, hope you are ending a great year.


I've a new requirement which I'm struggling to accomplish.


We need to add a "metric" as a column header in a matrix.


The report table is described in the image.













As you can see I've a dimension client, which I use a column headers, then I have a dimension brands, which I use as row header.
I have a facts table described with this 2 dimensions plus a date dimension.

Then I have 4 metrics (MTD, MTDvs Budget, YTD , YTD Vs Budget). I've already calculated them and they look fine. But the business requires that each Column header to have the % of the total of the column.


As you can see in the example, each column header has the value % calculated as (Grand Total MTD / The client total MTD) This is the total of all MTDS of the table, divided the corresponding ones of the client.

Even though Im still working on the metric, my main issue is how to use is as a column header.
Has anyone faced something similar ?


Looking forward for your feedback.

Happy new year !



German Viera
Super User
Super User

In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates:


For you, create a table like:




MTD Vs Budget


YTD vs Budget


Then you would create a measure that refers to your other measures. So, something along the lines of:


Metric to Show = 
VAR __metric = MAX('Table'[Metric])
  "MTD Vs Budget",[MTD Vs Budget],
  "YTD vs Budget",[YTD vs Budget],

This assumes that you have measures named [MTD], [MTD Vs Budget], etc. You would use the Metric column as a column in your matrix. So, the VAR gets the maximum value, which is to say the value in the column and then uses that to decide which of your 4 measures to display.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,


Thank you for your reply.


I'm not sure that this will solve my issue.


If you look at the image, I need to show the 4 metrics, for each client. This is not the issue.

What I'm unable to do, is to show the percentage on top of the client. This percentage is a metric, than should vary with the context of the slicers. This metric is variable.  So I'm able to create the metric and use it a a Value of the matrix, but Im unable to use it as a column header in a matrix.





German Viera

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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