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
danb
Resolver I
Resolver I

Taking Difference between two columns in a Table Visual (Values from different tables)

Good Morning!

I feel a bit foolish having to ask this question however I am stumped. I have a table visual that I am trying to layer out a budget and then the actual amount spent per account # per period. There are two different tables (my actual spent and original budget tables). I have them connected via account numbers a Fiscal Period. 

 

I have them in a Table visual as such:

Before.png

 

I am trying to add a "$ Delta" and "% Delta" for the difference between the Budget Amount and Actual Spend. I have tried various measures however I am doing something wrong. Here is an example of one formula:

Formula.png

 

The problem is when i add this measure in it blows out the dataset. I can see one row where I see what I am looking for (framed in red) however a whole bunch of extra rows show up as well. 

Error.png

 

Thanks in advance! 

 

Dan

 

1 ACCEPTED SOLUTION

@Icey  - thank you for your response. You are spot on and the issue is being caused by the relationship (or lack thereof). I actually went down the path of merging the two tables together into a new table and solved the issue that way. 

 

Dan

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @danb ,

I make a sample. If your data structure is similar to mine,the measure you create is meaningless. Because the value of 'Budget Amount' is the whole 'Fiscal Period' and the value of 'Actual Spent' is the specific value of each 'Account Description'. They are not one-to-one correspondence in the Table visual. Then you can tell me what do you want to do, so that I can help you better.

Taking Difference between two columns in a Table Visual (Values from different tables) 2 .PNG

Best Regards,

Icey Zhang

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Icey  - thank you for your response. You are spot on and the issue is being caused by the relationship (or lack thereof). I actually went down the path of merging the two tables together into a new table and solved the issue that way. 

 

Dan

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.