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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Matrix Subtotals

Hi,

 

I'am doing a report with a matrix where I display some measures. The problem is that subtotals and totals are not being properly calculated. I know that what Power BI does is apply the measure also in the total row but I can't find the way to calculate them properly. Here is the matrix that I'm building:

 

matrix1.PNG

I've higlighted some of the subtotals that are not well calulated. 

 

Here are my measures:

To calculate Planned Class Time 5:

 

Planned Class Time 5 = 
SUMX(
    SUMMARIZE(SESIONESTOTALES;I4_PS_PROGRAM[NOMBRE];I4_PS_PROGRAM[FECHA_INICIO];I4_PS_PROGRAM[FECHA_FIN];PROFESOR[Apellido_Nombre];SESIONESTOTALES[ROLPROFESOR];SESIONESTOTALES[CIUDAD];
    ASIGNATURA[NOMBRE];SESIONESTOTALES[SESIONCURSO]);
    [Class Time 4]
)

That is made of these three metrics:

 

Class Time 4 = 
IF(
    CONTAINS(SESIONESTOTALES;SESIONESTOTALES[ROLPROFESOR];7);
    DIVIDE(
        [SumMinutes];
        [Count Professor]);
    [SumMinutes]
)

SumMinutes = 
SUMX(SESIONESTOTALES;SESIONESTOTALES[MINUTOS])

Count Professor = 
CALCULATE(
    DISTINCTCOUNT(SESIONESTOTALES[PROFESOR]);
    GROUPBY(SESIONESTOTALES;SESIONESTOTALES[SESIONCURSO]);
    ALL(PROFESOR[Apellido_Nombre])
)

Standard Slots is calculated like this:

 

 

Standard Slots = 
SUMX(
    GROUPBY(SESIONESTOTALES;I4_PS_PROGRAM[NOMBRE];PERIODO[Start Date];PERIODO[End Date];PROFESOR[Apellido_Nombre];'Roles Professor'[Name];SESIONESTOTALES[SESIONCURSO];
    SESIONESTOTALES[Role Accepted]);
    DIVIDE(([Class Time 4] * SESIONESTOTALES[Role Accepted]);
    75)
)

Also if you have any idea of how to improve these measures it would be highly appreciated.

 

 

 

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

It sounds like a common measure total level calculate issue, you can take a look at following blog to know how to deal with this issue:

Measure Totals, The Final Word Measure Totals, The Final Word

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

It sounds like a common measure total level calculate issue, you can take a look at following blog to know how to deal with this issue:

Measure Totals, The Final Word Measure Totals, The Final Word

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

I am having the exact same issue.  The blog link did not work.  What is the solution to this issue?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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