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
Syndicate_Admin
Administrator
Administrator

Cómo usar Resumir para varias columnas en diferentes metrix para mostrar el subtotal de fila correcto

hola

Tengo cuatro columnas en mi mesa.

Región, Clúster, Franquicia, Segmento

A continuación, mida el trabajo bien cuando uso la región en el gráfico de métricas y da el subtotal de fila correcto.

Medida=
Resumen var = RESUMEN ('Tabla',[weekno],"_value",[Ventas])

devolución

IF(HASONEVALUE(Tabla[Región]), [Ventas], SUMX(resumen,[__value]))


¿Cómo puedo hacer que esta fórmula sea genric para otros campos como franquicia, segmento o clúster también?
Necesidad de mostrar el subtotal de fila correcto en otros gráficos de metrix.


1 ACCEPTED SOLUTION

Gracias por sus entradas.

Thank you very much.

Measure=
VAR summarytable = SUMMARIZE('Table',[Segment],[Franchise],[Cluster],[weekno],"_value",[Sales])
Return

SUMX(summarytable ,[__value])

This formula finally worked for me, I need to use all columns in summarize.
I have than used AddColumns with Summarize to find best performance out of it as Summarize was giving me performance issues.

Measure=
VAR summarytable = AddColumns(SUMMARIZE('Table',[Segment],[Franchise],[Cluster],[weekno]),"_value",[Sales])
Return
SUMX(summarytable ,[__value])

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

No @nayan28apr,

Modifique su medida como se indica a continuación:

Measure=
VAR summarytable = SUMMARIZE('Table',[weekno],"_value",[Sales])
Return

IF(HASONEVALUE(Table[weekno]), [Sales], SUMX(summarytable ,[__value]))

Y verás:

v-kelly-msft_0-1620805529183.png

Compruebe mi archivo .pbix de ejemplo adjunto.


Saludos
Kelly

¿Respondí a tu pregunta? ¡Marca mi puesto como solución!

Gracias por sus entradas.

Thank you very much.

Measure=
VAR summarytable = SUMMARIZE('Table',[Segment],[Franchise],[Cluster],[weekno],"_value",[Sales])
Return

SUMX(summarytable ,[__value])

This formula finally worked for me, I need to use all columns in summarize.
I have than used AddColumns with Summarize to find best performance out of it as Summarize was giving me performance issues.

Measure=
VAR summarytable = AddColumns(SUMMARIZE('Table',[Segment],[Franchise],[Cluster],[weekno]),"_value",[Sales])
Return
SUMX(summarytable ,[__value])
Syndicate_Admin
Administrator
Administrator

@nayan28apr , Grupos de cálculo es una solución.

Hay un conjunto de blogs de sqlbi, se pueden encontrar otros enlaces en este blog.

grupos de cálculo
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

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.