cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Patron

## Modify operation of the matrix total

Hello,
I have the following matrix that is composed of the rows of two fields of a table and two measures for the values. The matrix comes out correctly minus the total, as you can see it makes the sum of all the sub-records and what would interest me is for it to do the same operation as the sub-values.
The measurements dias rotura and %rotura are as follows:

``% Rotura = [Cant Rotura]/[Dias Envio laborable2]``
``dias rotura = IF(COUNT('newintranet roturas'[codigo])=BLANK(),0,COUNT('newintranet roturas'[codigo]))``
``Dias Envio laborable2 = CALCULATE(COUNTROWS(Fechas),ALL(Fechas),DATESBETWEEN(Fechas[Date],[Fecha inicio],[Fecha final]),Fechas[Día Semana número] in {1,2,3,4,5})``

Do you know how I can make the total do the same operation as the rows? or failing that, if that could not be done, eliminate that total, which is simply the sum.
Thank you

1 ACCEPTED SOLUTION

Crear medidas

``Total = SUM('Table'[Value])``
``````Percentage =
VAR a = SELECTEDVALUE('Table'[Value])
VAR b =
CALCULATE(
SUM('Table'[Value]),
ALLEXCEPT(
'Table',
'Table'[Type]
)
)
RETURN
a/b``````
``````Result =
IF(
ISFILTERED('Table'[Part]),
[Percentage],
1
)``````

Saludos
Alberto He

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente

3 REPLIES 3
Post Patron

It worked well for me, now I no longer get the incorrect total, at least it comes out blank and everything else is correct.

Is there a way to calculate the total but without adding it?

Crear medidas

``Total = SUM('Table'[Value])``
``````Percentage =
VAR a = SELECTEDVALUE('Table'[Value])
VAR b =
CALCULATE(
SUM('Table'[Value]),
ALLEXCEPT(
'Table',
'Table'[Type]
)
)
RETURN
a/b``````
``````Result =
IF(
ISFILTERED('Table'[Part]),
[Percentage],
1
)``````

Saludos
Alberto He

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente

Aquí algunos pasos que quiero compartir, puedes consultarlos si se ajustan a tu requerimiento.
Aquí están mis datos de prueba:

Crear una medida

``````Total =
IF(
ISFILTERED('Table'[Part]),
SUM('Table'[Value]),
BLANK()
)``````

Puede consultar esta documentación
Manejo inteligente de jerarquías en DAX - SQLBI

Saludos
Alberto He

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

#### New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors