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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Unicorn_Tech
Resolver I
Resolver I

calculate with multiple filters and circular dependancies

I have licenses with many contracts.  I want to calculate which contract is the latest (most recent signature date), filtered by those that have a payment above 1, and have a stage type greater than 100001000 (this excludes irrelevant contracts from the result.

I was able to do a column where the latest date was returned with the filter of the license value:

Most Recent Contract = calculate(max(new_contracts[new_signature_date].[Date]),
Filter(new_contracts,new_contracts[_new_license_value] = new_licenses[new_licenseid]))

I cannot add multiple filters to this, or I don't know the way to.  My preference would be to add two more filters, one for payment above 1 and the stage type.

I tried making filtered tables as a solution, which is creating the circular dependancies.

Proper Contracts = 
Calculatetable(new_contracts,
Filter(new_contracts,new_contracts[new_contractstage]<100001000))

 

Paid Contracts = 
Calculatetable('Proper Contracts',
Filter('Proper Contracts','Proper Contracts'[new_budget]>0))


I would appreciate assistance in putting this together. The goal is to be able to properly flag the correct contract per license, being the latest, of certain types, with a budget above 1.

Thank you.

1 ACCEPTED SOLUTION
Unicorn_Tech
Resolver I
Resolver I

I always end up making progress on these things after I post.  Now I've done the following column, finally getting the syntax right.

Most Recent Real Paid = CALCULATE(Max(new_contracts[new_signature_date]),
Filter(new_contracts,new_contracts[_new_license_value] = new_licenses[new_licenseid] &&
new_contracts[new_budget]>1&&
new_contracts[new_contractstage]<100001000
))

 

View solution in original post

1 REPLY 1
Unicorn_Tech
Resolver I
Resolver I

I always end up making progress on these things after I post.  Now I've done the following column, finally getting the syntax right.

Most Recent Real Paid = CALCULATE(Max(new_contracts[new_signature_date]),
Filter(new_contracts,new_contracts[_new_license_value] = new_licenses[new_licenseid] &&
new_contracts[new_budget]>1&&
new_contracts[new_contractstage]<100001000
))

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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