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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
ciacaete
Regular Visitor

Subtracting goal value from last filled entry

Hi, I'm a beginner in Power BI and DAX functions, and I'm trying to subtract the column "Meta Horária" and "Entrada Caeté" like this: 

Diferença Entrada de Cana e Meta = MAX(Planilha1[ENTRADA_CANA])- MAX(Planilha1[META_ACUMULADA_CANA])

 I've also tried like this 

Diferença Entrada de Cana e Meta = MAX(Planilha1[ENTRADA_CANA])- SUM(Planilha1[META_ACUMULADA_CANA])

But none have returned the value I wish for, I'd like to have both values as indicated in the image in the subtraction yet, I don't see how I'm able to do it, the expected value would be "809-1260=-451". How can I do it?

Captura de tela 2022-09-22 134543.png

 

 

Captura de tela 2022-09-22 135912.png

 

1 ACCEPTED SOLUTION

Diferenca Entrada de Cana e Meta =
IF(
ISBLANK(Planilha1[Entrada Cana])
BLANK(),
Planilha1[Entrada Cana],
 - Planilha1[Meta__Acumulada_Cana]
)
 
Should do it.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
jgeddes
Super User
Super User

You should be able to use a calculated column to get the desired result.

 

Diferenca Entrada de Cana e Meta =
Planilha1[Entrada Cana] - Planilha1[Meta__Acumulada_Cana]

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you! but now I've encoutered a new problem, how can I make that it only executes the function if I have a value and if I don't, leave it blank? Captura de tela 2022-09-22 150939.png

 

Diferenca Entrada de Cana e Meta =
IF(
ISBLANK(Planilha1[Entrada Cana])
BLANK(),
Planilha1[Entrada Cana],
 - Planilha1[Meta__Acumulada_Cana]
)
 
Should do it.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.