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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
SureshPantra
Helper II
Helper II

Difference between two values

Hi Team,

 

I have a query , In a table one column contains target and actual values, i want a column with the difference between target and actual value.

 

 

Regards,

Suresh Pantra.

5 REPLIES 5
Anonymous
Not applicable

Column = Table3[Actual] - Table3[Target]

Hi Milk,

Thanks for your reply, Can you please explain how am not able to find.

 

Anonymous
Not applicable

Ofcourse!

First select the table you want the new calculated column to be part of.

table.png

Second go to the modeling tab and click new column

miodelingtab.png

At last you need to fill in the code:

code.png

and then you get this:

dsfd.png

 

To further breakdown the code:

Column = Table3[Actual] - Table3[Target]

Column =  is the column name. you can change this to whatever you want. For example

Difference = Table3[Actual] - Table3[Target]

would work perfectly.

Table3[Actual] and [Target] are just the fields of your table. replace table3 with the table name of your own and Actual and Target with the correct column names.

 

Goodluck! 😄

Hi Milk ,

Thank you for spending time for my query. 

I have a data like this,

AccountTypeValue1Value2Value3
ABCBudget245
ABCTarget364
DEFBudget368
DEFTarget472.4
GHIBudget32.43.5
GHITarget45.63.6

 

In PBI Desktop if i use a slicer for account and if i select ABC i need a table like this,

AccountTypeValue1ValueValue3
ABCBudget245
ABCTarget364
ABCDifference12-1

 

Can you please suggest me ASAP.

 

Regards,

Suresh .

Hi Milk,

Thanks for your reply, Can you please explain how am not able to find.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.