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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Cookie_Lover
Helper I
Helper I

Show two measures in one matrix (based on index with average) or create a new single measure for it?

Hello,

 

I have two measures in two matrixes. Now, I want to have these two measures as columns in one matrix, because the categories are the same. What I did was to build an average for green and set a index for it, which is 100. Now the values for blue and red should be indexed based on the new Green Total Average.Screenshot 2025-12-08 135709.pngScreenshot 2025-12-08 135721.png

The last two measures are displayed in the matrixes:

 

Average Value = AVERAGE(Table1[Value])
Average Green = 
CALCULATE(AVERAGE(Table1[Value]),FILTER(Table1,Table1[Color] in {"very light green","light green","green","dark green","very dark green"}))
Green in whole column in filter context = 
DIVIDE ([Average Value],
CALCULATE(
    AVERAGE(Table1[Value]),
    ALLSELECTED(Table1[Product],Table1[Year]),
        Table1[Color] in {"very light green","light green","green","dark green","very dark green"},
         Table1[Product] = MIN (Table1[Product])
            &&
            Table1[Year] = MIN (Table1[Year])

),0)*100
Green Total Index 100 = DIVIDE (Table1[Average Green],Table1[Average Green],0)*100


Data:

ProductYearColorValue
Smartphone2025very light green3
Smartphone2025light green5
Smartphone2025medium green4
Smartphone2025dark green7
Smartphone2025very dark green8
Smartphone2025blue3
Smartphone2025red5
Laptop2025very light green10
Laptop2025light green1
Laptop2025medium green2
Laptop2025dark green53
Laptop2025very dark green8
Laptop2025blue6
Laptop2025red9
Smartphone2024very light green63
Smartphone2024light green32
Smartphone2024medium green65
Smartphone2024dark green86
Smartphone2024very dark green21
Smartphone2024blue22
Smartphone2024red11
Laptop2025very light green1
Laptop2025light green6
Laptop2025medium green8
Laptop2025dark green9
Laptop2025very dark green4
Laptop2025blue5
Laptop2025red6



 

1 ACCEPTED SOLUTION

To get what you ask you need to create a dedicated measure for blue and one for red

 

Blue = 
CALCULATE(AVERAGE(Table1[Value]),Table1[Color] ="Blue")

Red = 
CALCULATE(AVERAGE(Table1[Value]),Table1[Color] ="Red")

 

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

View solution in original post

11 REPLIES 11
Cookie_Lover
Helper I
Helper I

Here is a mockup of the desired result:

Unbenannt-1.png

To get what you ask you need to create a dedicated measure for blue and one for red

 

Blue = 
CALCULATE(AVERAGE(Table1[Value]),Table1[Color] ="Blue")

Red = 
CALCULATE(AVERAGE(Table1[Value]),Table1[Color] ="Red")

 

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Thank you, but I think there must be somehow the year included in the measure.

Ashish_Mathur
Super User
Super User

Hi,

Sorry but cannot understand what you want.  Is it possible for you to put this data in an MS Excel file and show the expected result with your formulas there?  Share the download link of the Excel file.


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

I posted the pbix file and a mockup of the desired matrix in this thread. Here is the excel file:

Combine Measures.xlsx


Cookie_Lover
Helper I
Helper I

Hi @FBergamaschi,

I want one matrix with the three columns 'Green Total Index 100', 'blue' and 'red'.

 

@Cookie_Lover , You can have an additional column in the Table, which gives three Values- Green, Blue,and  Red. 
Now we can have column or measure avg

This will kind of fix 
Column Avg = averageX(Filter(Table, [Product] = earlier([Product]) &&  [Year] = earlier([Year]) &&  [New Color col] = earlier([[New Color col]) ), [Value]) 

Measure = averageX(Filter(allselected(Table), [Product] = max([Product]) &&  [Year] = max([Year]) &&  [New Color col] = max([[New Color col]) ), [Value]) 


Assume you have two measure and you want to use them as dimensions, create calculation group for those  measures 
Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

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

@amitchandak , Can you expain, what you mean with [New Color col]? Furthermore, I think there are some mistakes in your two measures, when in put them in Power BI. Sorry, I am a beginner in DAX an can not fix it by myself. Alternatively, here is the pbix file. Maybe someone can build the desired matrix.

Example_Combine_Matrixes.pbix

OK

 

Put the color column in the Rows section of the matrix and the measure Green Total Index 100 in Values

 

Does that work?

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

This does not work. I posted the pbix file in this thread, maybe you can try it directly in the file.

FBergamaschi
Super User
Super User

Hi @Cookie_Lover 

I do not understand what you are asking

 

Helpful resources

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

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.