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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Matrix

Hello, I got this Matrix with this information:

PatVi_0-1623057672592.png

PatVi_1-1623057681124.png

 

And i would like to have the information on the row. For exemple this:

PatVi_2-1623057833474.png

 

But I don't know what to put in my rows to have this because I dont have a column with those 3 names in my power bi.

Do you know how to do it?

Thanks

 

1 ACCEPTED SOLUTION
SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous,

 

  1. Create a Table with the Enter Data Option with a column (MeasureName) that will have three rows(based on the example) - Production, Sant Effet, and Production nette
  2. Create a measure: 
Value =
VAR SelValue =
    SELECTEDVALUE ( Table[MeasureName] )
RETURN
    SWITCH (
        TRUE (),
        SelValue = "Production", SUM ( MainTable[Production] ),
        SelValue = "Sant Effet", SUM ( MainTable[Sant Effet] ),
        SelValue = "Production nette", SUM ( MainTable[Production nette] )
    )

 3. Add MeasureName to Rows and Value Measure to Column

 

It will work.

View solution in original post

10 REPLIES 10
SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous,

 

  1. Create a Table with the Enter Data Option with a column (MeasureName) that will have three rows(based on the example) - Production, Sant Effet, and Production nette
  2. Create a measure: 
Value =
VAR SelValue =
    SELECTEDVALUE ( Table[MeasureName] )
RETURN
    SWITCH (
        TRUE (),
        SelValue = "Production", SUM ( MainTable[Production] ),
        SelValue = "Sant Effet", SUM ( MainTable[Sant Effet] ),
        SelValue = "Production nette", SUM ( MainTable[Production nette] )
    )

 3. Add MeasureName to Rows and Value Measure to Column

 

It will work.

Anonymous
Not applicable

@SivaMani Thank you but if I do it, the matrix will not be changing with a filter in my report right?. For exemple if I change a filter in my report it would not calculate again my measure Production, Sans Effet and Production nette and display the correct values. It will display the old values. To information, my 3 measures can be filter thanks to 2 columns, columns "X" and "Y". Can we had a line of code in your code to allowed the matrix to recalculate the values whena filter changed?

Thanks 

Pragati11
Super User
Super User

HI @Anonymous ,

 

Under ROWS section you can move only a column.

Do you have something in your data like a categorical column with 3 values as categories that you have moved the measures for?

I am assuming that under VALUES section you moved 3 measures.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@Pragati11 Hello, no as my 3 values are measure I don't have a categorical column with my values name.

HI @Anonymous ,

 

In that case follow the solution mentioned by @SivaMani using the approach of a disconnected table.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@Pragati11 ok thank you, but as I reply to him it will not re calculate my values if I change the filters no? 

@Anonymous, Don't worry!

The report filters will filter the data and measures will recalculate accordingly.

Anonymous
Not applicable

Thank you its working!

 

@Anonymous, you're welcome🙂

Hi @Anonymous ,

 

Ideally it should not.

Just try and let me know how it works.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors