cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SureshPantra Regular Visitor
Regular Visitor

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

Re: Difference between two values

Column = Table3[Actual] - Table3[Target]
SureshPantra Regular Visitor
Regular Visitor

Re: Difference between two values

Hi Milk,

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

 

SureshPantra Regular Visitor
Regular Visitor

Re: Difference between two values

Hi Milk,

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

 

Anonymous
Not applicable

Re: Difference between two values

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! 😄

SureshPantra Regular Visitor
Regular Visitor

Re: Difference between two values

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 .

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 155 members 1,616 guests
Please welcome our newest community members: