Let's say I have a table of projects and their associated companies, dates, and costs:
Project IDs are unique, but one company can have multiple projects. This table is linked (many to one) with a "Company" table:
Which is then linked (one to many) with a "Status" table:
I'm just using colors here, the type of status is arbitrary.
I'm looking for a way to sum up the cost of projects for each company only while the company was in "green" status. I assume it could be a calculated column on the Project table, maybe just as a True/False flag. Look over at the Status table, filter by Company, filter Status to green, and if Project[Date] is in between Start Date and End Date, return True.
In the example above, three projects would be marked True: 00001, 00006, and 00007.
What's the best way to do this in DAX?