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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sanvass72
New Member

Sumar Columna resultado de una medida.

Hola: les comento que tengo una tabla donde obtengo una columna  IMPORTE (medida), otra columna FACTURACION SIMULADA ANTERIOR (medida) y otra columna IMPACTO MIX (medida) que es la diferencia entre las 2 anteriores.

El problema es que no se como mostrar los totales sumando los valores la columna.

sanvass72_0-1657114044916.png

 

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @sanvass72 

 

I've simulated some data that I hope fits your situation. The function IF(HASONEVALUE()), can control the output of Total.

Difference = 
IF (
    HASONEVALUE ( 'Table'[Date] ),
    [Previous Amount] - [Amount],
    SUMX (
        SUMMARIZE ( 'Table', 'Table'[Date], "Difference", [Previous Amount] - [Amount] ),
        [Difference]
    )
)

vzhangti_0-1657521454458.png

You can try this formula and see if it outputs the results you expect. If it still does not work out, please provide more example data.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @sanvass72 

 

I've simulated some data that I hope fits your situation. The function IF(HASONEVALUE()), can control the output of Total.

Difference = 
IF (
    HASONEVALUE ( 'Table'[Date] ),
    [Previous Amount] - [Amount],
    SUMX (
        SUMMARIZE ( 'Table', 'Table'[Date], "Difference", [Previous Amount] - [Amount] ),
        [Difference]
    )
)

vzhangti_0-1657521454458.png

You can try this formula and see if it outputs the results you expect. If it still does not work out, please provide more example data.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.