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
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
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.