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
Matt22365
Resolver III
Resolver III

subtract max value from table 1 from max value in table 2 with date filters

Hi

I need a measure which will subtract the max value from 1 table from the max value in another table based on date ranges

 

Simplified Table 1 - Budget

Date Column and a Budget column (number)

 

Simplified Table 2 - Spend

Date column and Spend column (Number)

 

I also have a date table to link them together. I cant link them directly due to other relationships

 

I want to determine how much budget is left This year by subtracting the spend from the budget and refer to that in a card

So ive done the following measure:

 = Max(table1[Budget]) - Max(table2[Spend])

And put a relative date filter on the card for this year using the date table

This gives me the incorrect answer i.e. 200 - 72 = 90

 

Ive seperated the 2 halves of the formula out to see if I can get a vlaue for spend and budget seperately with the same date filter, this works perfectly. its only when the formula is put together I get the wrong answer

 

Hope someone can help

 

Matt 

 

1 REPLY 1
VahidDM
Super User
Super User

Hi @Matt22365 

 

Can you share a sample of your tables in a text format here?

 

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

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.