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
telesforo1969
Helper II
Helper II

subtract a measurement from calculated parameter

I want support for subtracting a created reference from a measure. I have calculated the cost of Fuel "S", I want to subtract this value from each of the other Fuels, I only get the fuel "S". what am I doing wrong?  

 

Table 1 contains the original values, table 2 I want the difference. FuelSelected.JPG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@telesforo1969 , It should be like

 

Sum(Hejol[Costo]) -  calculate(Sum(Hejol[Costo]) , Hejol[fuel] ="S"))

 

refer if needed

http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

View solution in original post

2 REPLIES 2
telesforo1969
Helper II
Helper II

Thank you so much

 

FuelSelected1.JPG

amitchandak
Super User
Super User

@telesforo1969 , It should be like

 

Sum(Hejol[Costo]) -  calculate(Sum(Hejol[Costo]) , Hejol[fuel] ="S"))

 

refer if needed

http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

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.