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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Em3dream123
Frequent Visitor

Matrix add each total for each Value in row

Hi all,

 

I am trying to get the SUM of each value of rows but I have no idea on how to do it.

Example for what I have :

Em3dream123_0-1698685334547.png

Example for what I wish :

Em3dream123_1-1698685379300.png

Thank you for you help 

Em3dream123_3-1698685402721.png

 

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hello! Create an explicit measure for SL an TN (Basically, take whatever measure you have for the values now and create two more - one that is based on it being filtered to SL and one for TN: 

SL = CALCULATE(
    [YourMeasure],
    'TableName'[CATEGORY_GRP] IN { "SL" }
)
 
then,
 
TN = CALCULATE(
    [YourMeasure],
    'TableName'[CATEGORY_GRP] IN { "TN" }
)
 
Once these are ready, remove the measure you have now and add these two, then go to the formatting for the matrix, expand the values section, expand options and switch values to rows:
audreygerred_0-1698687802486.png

Here is one I did with some sample data to show how it would look:

audreygerred_1-1698687980405.png

 




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

Proud to be a Super User!





View solution in original post

9 REPLIES 9
Em3dream123
Frequent Visitor

@audreygerred How about add each total for each Value in sub column instead of row, i want adding total of "SAN_LUONG","TIEN_NUOC" below total col?

Em3dream123_0-1698804265094.png

 

Hello! Are "SAN_LUONG","TIEN_NUOC" separate measures in your model or is it one measure that is categorized by a dimension field? 




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

Proud to be a Super User!





@audreygerred i did it but now i have new problem

Em3dream123_0-1698819301693.png

 

as you see the bold number below is calucate by TIEN_NUOC/SAN_LUONG,
and SL_DHN is the columns to show for each row not depence by A, B columns
any idea for that problem Thanks you

Em3dream123
Frequent Visitor

Hi @audreygerred , in that formula, 

SL = CALCULATE(
    [YourMeasure],
    'TableName'[CATEGORY_GRP] IN { "SL" }
)
What needs to be provided for [YourMeasure] 
Thanks you.

Whatever measure you have in place that gets you these values in your chart (I am assuming it is a sum of a field in your table). If you don't have this base measure yet, create that, then create the SL and TN measures that will use it.

audreygerred_0-1698717384171.png

 




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

Proud to be a Super User!





thanks you, that working!

Awesome! Happy I could help!




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

Proud to be a Super User!





audreygerred
Super User
Super User

Hello! Create an explicit measure for SL an TN (Basically, take whatever measure you have for the values now and create two more - one that is based on it being filtered to SL and one for TN: 

SL = CALCULATE(
    [YourMeasure],
    'TableName'[CATEGORY_GRP] IN { "SL" }
)
 
then,
 
TN = CALCULATE(
    [YourMeasure],
    'TableName'[CATEGORY_GRP] IN { "TN" }
)
 
Once these are ready, remove the measure you have now and add these two, then go to the formatting for the matrix, expand the values section, expand options and switch values to rows:
audreygerred_0-1698687802486.png

Here is one I did with some sample data to show how it would look:

audreygerred_1-1698687980405.png

 




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

Proud to be a Super User!





No entiendo, yo necesito 2 filas de total, uno para el total annual y otro para el total YTD y no consigo hacerlo en la misma tabla

tornikevadach_0-1713256990449.png

 

 

Como puedo hacer para añadir el total de fila YTD que me falta?

tornikevadach_1-1713257086583.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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