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
Anonymous
Not applicable

Filter Based on another table

Here is the matrix visual I am creating. The problem is that my measure for Next Milestone Budget is returning blanks.

eloomis_0-1681310705968.png

 

Here is the model view of the tables in question to create this visual. ProjectID comes from #Success - Project List, - Next Milestone Due Date is a measure based in DimMilestone, relying on only data from that table.

eloomis_1-1681310770008.png

 

 

 

Here is the DAX for Next Milestone Budget. Milestone Date VAR is the same code to generate - Next Milestone Due Date in the visual above.


Budget comes from #Support - Tasks, but I need to filter that table based on the next milestone date.

If I leave out that second filter in the calculate, I get a sum of all budget points for the project of the task type I'm filtering for. But when I try to add the filter for Milestone, it returns all blanks.

- Next Milestone Budget = 
VAR 
MilestoneDate = 
    CALCULATE(
        MIN(DimMilestone[EndDate]),
        DimMilestone[MilestoneStatus] = "Pending"
    )

RETURN 
CALCULATE(
    SUM('#Support - Tasks'[TaskBudget]),
    '#Support - Tasks'[TaskType] = "Software Minor Update",
    '#Support - Tasks'[MilestoneEndDate] = MilestoneDate
)

 

 

Any help would be appreciated, thanks very much in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for this. I was messing around with the relationships and was able to get it workign with a relationship directly to the project table from tasks instead of through the milestone table. I'll try this out though and see if it would work without changing the relationships.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@tamerj1 You have been able to help me out with questions before, would you be willing to take a look at this? Thank you very much!

@Anonymous 
What are the columns involved in th erelationships? Please provide details.

Anonymous
Not applicable

Thanks for responding. 

 

ProjectMilestoneEndDate is a unique column generated from combining the project id,  milestone name, and milestone end date as the milestones don't have a unique ID.

eloomis_0-1681391836612.png

eloomis_1-1681391934061.png

 

 

Here is some sample data:

 

DimMilestone:

eloomis_2-1681392095022.png

 

#Support - Tasks:

eloomis_3-1681392177350.png

 

#Success - Project List:

eloomis_4-1681392270752.png

 

 

 

 

Hi @Anonymous 

please try

- Next Milestone Budget =
VAR MilestoneDate =
CALCULATE (
MIN ( DimMilestone[EndDate] ),
DimMilestone[MilestoneStatus] = "Pending"
)
RETURN
CALCULATE (
SUM ( '#Support - Tasks'[TaskBudget] ),
'#Support - Tasks'[TaskType] = "Software Minor Update",
'#Support - Tasks'[MilestoneEndDate] = MilestoneDate,
ALL ( DimMilestone )
)

Anonymous
Not applicable

Thanks for this. I was messing around with the relationships and was able to get it workign with a relationship directly to the project table from tasks instead of through the milestone table. I'll try this out though and see if it would work without changing the relationships.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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