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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
hasarinfareeth
Frequent Visitor

Custom Static columns in Matrix Table

Hi 

 

I am tryng to add a customer static column in a Matrix table visual where I have count of tickets closed for each month in a specific function. 

 

Below is my Matrix table where description is the function and the numbers are the count of the tickets closed for each month. I wanted to add a statis column against each description mentioning if it is automated or not. This status column is a text column where I can provide if the updates on the automation if not completed. 

 

Note - the static column is available in the same table where I have the description details as a master data. 

 

Can anyone help me, please?

 

hasarinfareeth_0-1738866211334.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @hasarinfareeth 

Based on your description, I've created this example data:

vjianpengmsft_0-1740462088303.png

vjianpengmsft_1-1740462099815.png

First, create a header table that will contain the columns in your matrix:

vjianpengmsft_2-1740462140300.png

vjianpengmsft_3-1740462155581.png

After that, create the relationship as follows:

vjianpengmsft_4-1740462186638.png

Then establish the following measure:

Measure = 
VAR _index = SELECTEDVALUE('Header Table'[Index])
RETURN SWITCH(TRUE(),
    _index=1,CALCULATE(MAX('Table'[static])),
    CALCULATE(SUM('Table'[SalesAmount]),USERELATIONSHIP('Header Table'[Type],'Date Table'[Year-Month]))
)

As a result, you were able to correctly add a static column to the matrix:

vjianpengmsft_5-1740462263794.png

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, @hasarinfareeth 

Based on your description, I've created this example data:

vjianpengmsft_0-1740462088303.png

vjianpengmsft_1-1740462099815.png

First, create a header table that will contain the columns in your matrix:

vjianpengmsft_2-1740462140300.png

vjianpengmsft_3-1740462155581.png

After that, create the relationship as follows:

vjianpengmsft_4-1740462186638.png

Then establish the following measure:

Measure = 
VAR _index = SELECTEDVALUE('Header Table'[Index])
RETURN SWITCH(TRUE(),
    _index=1,CALCULATE(MAX('Table'[static])),
    CALCULATE(SUM('Table'[SalesAmount]),USERELATIONSHIP('Header Table'[Type],'Date Table'[Year-Month]))
)

As a result, you were able to correctly add a static column to the matrix:

vjianpengmsft_5-1740462263794.png

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi, @hasarinfareeth 

I wish you all the best. Previously we have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.

 

 

Best Regards

Jianpeng Li

Anonymous
Not applicable

Hi, @hasarinfareeth 

Add a separate column to the matrix, which in Power BI can be achieved by customizing the matrix layout.
By defining a table of matrix columns, the corresponding values are returned by using the DAX function judgment.
I found a detailed blog in the community to explain this matter, and it is worth your reference and use in your example:

Creating a “custom” or “hybrid” matrix in PowerBI - Microsoft Fabric Community

vjianpengmsft_0-1738907172153.png

Alternatively, you can follow the practice in the following two cases.

Solved: How to show a Row Total as Row element in a matrix... - Microsoft Fabric Community

Solved: How to add a custom measure at the end of matrix v... - Microsoft Fabric Community

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.