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
Medifarm
New Member

RESTAR INGRESOS DE EGRESOS EN UNA TABLA

Buenos días, me gustaría restar los valores  de una tabla, considerando que las palabras ingreso y egreso se encuentran en una misma columna

Medifarm_0-1688053882087.png

 

En el total quisiera obtener la resta entre ellos.

Mil gracias 

 

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Escribe una medida como esta:

Total $ = CALCULATE(SUM('TableName'[I/E]),'TableName'[I/E]="INGRESO") - CALCULATE(SUM('TableName'[I/E]),'TableName'[I/E]="EGRESO")

Eso le daría la diferencia total, pero no tendría sentido dividirlo por INGRESO / EGRESO.

Para eso, puedo sugerirle que vaya a crear una columna calculada como NewColumn = IF([I / E] = "EGRESO", [ColumnWithTheValues]*-1, [ColumnWithTheValues])

Helpful resources

Announcements
Europe Fabric Conference

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.

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.

Top Solution Authors