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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ayaasfour
Frequent Visitor

Create measure at last row of matrix

Hey,

I want to make average to all column values at last row of matrix , but I dont have static column name ,I draw the matrix only by row and column number, can I do this?

 

row12
1510
21020
average7.515

 

 Problem when I create measure I dont have column names to create operations on it

1 ACCEPTED SOLUTION
Anonymous
Not applicable

 

I'm not sure if I understand your needs accurately, I made a simple sample, here is my table and you can try measure like this:

vcaitlynmstf_0-1629444047733.png

 

M_LY Sales =

IF (

    ISFILTERED ( 'Table'[Product] ),

    SUM ( 'Table'[LY sales] ),

    AVERAGEX (

        VALUES ( 'Table'[Product] ),

        CALCULATE ( SUM ( 'Table'[LY sales] ) )

    )

 

 

M_Sales =

IF (

    ISFILTERED ( 'Table'[Product] ),

    SUM ( 'Table'[sales] ),

    AVERAGEX ( VALUES ( 'Table'[Product] ), CALCULATE ( SUM ( 'Table'[sales] ) ) )

)

 

Then create a matrix and you can get a result like this :

vcaitlynmstf_1-1629444047759.png

 

A demo is attached for your reference.

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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

2 REPLIES 2
Anonymous
Not applicable

 

I'm not sure if I understand your needs accurately, I made a simple sample, here is my table and you can try measure like this:

vcaitlynmstf_0-1629444047733.png

 

M_LY Sales =

IF (

    ISFILTERED ( 'Table'[Product] ),

    SUM ( 'Table'[LY sales] ),

    AVERAGEX (

        VALUES ( 'Table'[Product] ),

        CALCULATE ( SUM ( 'Table'[LY sales] ) )

    )

 

 

M_Sales =

IF (

    ISFILTERED ( 'Table'[Product] ),

    SUM ( 'Table'[sales] ),

    AVERAGEX ( VALUES ( 'Table'[Product] ), CALCULATE ( SUM ( 'Table'[sales] ) ) )

)

 

Then create a matrix and you can get a result like this :

vcaitlynmstf_1-1629444047759.png

 

A demo is attached for your reference.

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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

 

amitchandak
Super User
Super User

@ayaasfour , you can change the grand total to average if you line by switching the measure using isinscope.

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

I doubt you can add a row

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors