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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
PowerBI-P
Frequent Visitor

Matrix table in Power bi

Hi All,

 

Please help me with this problem if you have any idea.

I'm trying to work on matrix in Power BI as given below example.

 

PowerBIP_0-1772109919970.png

Then I created Average measure to get the values after "Total column" but when I place the avg measure in to the values in Power BI then format is getting like below i.e., Total and Avg is displaying under each day but I don't want like this.

 

PowerBIP_2-1772110570019.png

 

I would like to display like below.

 

PowerBIP_3-1772110706673.png

 

Please advise anyone has idea.

 

Thanks,

P!

 

 

 

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @PowerBI-P 

Create a display table which is disconnected from the rest of the model, containing the column header values.

danextian_0-1772600859056.png

Create a measure referencing the table

Display Table Measure = 
VAR _total = [Total Transactions]
VAR _avg =
    AVERAGEX ( ALLSELECTED ( Dates[Day of Week Short] ), [Total Transactions] )
VAR _day =
    CALCULATE (
        [Total Transactions],
        TREATAS ( VALUES ( DisplayTable[Day of Week Short] ), Dates[Day of Week Short] )
    )
RETURN
    SWITCH (
        SELECTEDVALUE ( DisplayTable[Day of Week Short] ),
        "Total", _total,
        "Avg", _avg,
        _day
    )

danextian_1-1772600984234.png

Please see the attached pbix.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

8 REPLIES 8
danextian
Super User
Super User

Hi @PowerBI-P 

Create a display table which is disconnected from the rest of the model, containing the column header values.

danextian_0-1772600859056.png

Create a measure referencing the table

Display Table Measure = 
VAR _total = [Total Transactions]
VAR _avg =
    AVERAGEX ( ALLSELECTED ( Dates[Day of Week Short] ), [Total Transactions] )
VAR _day =
    CALCULATE (
        [Total Transactions],
        TREATAS ( VALUES ( DisplayTable[Day of Week Short] ), Dates[Day of Week Short] )
    )
RETURN
    SWITCH (
        SELECTEDVALUE ( DisplayTable[Day of Week Short] ),
        "Total", _total,
        "Avg", _avg,
        _day
    )

danextian_1-1772600984234.png

Please see the attached pbix.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ashish_Mathur
Super User
Super User

Hi,

This can be done with calculation groups.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you, @ashish.

 

v-hashadapu
Community Support
Community Support

Hi @PowerBI-P , Thank you for reaching out to the Microsoft Community Forum.

 

We find the answer shared by @Natarajan_M & @MFelix  is appropriate. Can you please confirm if the solution worked for you. It will help others with similar issues find the answer easily.

 

Thank you @Natarajan_M & @MFelix  for your valuable response.

Natarajan_M
Solution Sage
Solution Sage

Hi @PowerBI-P , If the template is fixed and still you want to get data in the format we can make use of the SVG 

Natarajan_M_0-1772118326738.png


Matrix.pbix
Please find the attached pbix for more details.

Thanks

If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster



Hi Natarajan,

 

Sorry for the late reply due to on holidays. 

 

Thank you for your help. I tried to open Matrix.pbix file but it is not allowing me becuase my IT has blocked the site of outside links. 

Is it possible to send Matrix.pbix file to my personal email if I mention here, please?

Thanks,

P

MFelix
Super User
Super User

Hi @PowerBI-P ,

 

This is related with the way that matrix work, when you place any value on the matrix this will be applied for all rows and for all columns and you are not able to hide it, you can turn on/off the totals but not the values so that Avg is repeated in all the columns.

 

For this you can try and use the calculation groups to get the correct values with a single metric in this case.

 

The best explanation I know is from @parry2k .


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi @MFelix,

Sorry for late reply due to on holidays. Thank you so much for your help.

Thanks,

P

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.