Forum Discussion
Calculated measure based on date from related table
- 2 years ago
I ended up redesigning my query and tables so this is not valid anymore.
Unfortunately not working but we are closer :). We've got one value.
You can see that there is only 1 completed task between 19.12.2023 and 29.01.2024.
I've made a slicer to filter completed tasks straight from the tasks table and you can see there are 5 of them. I've unlinked slicer from the left table. Count of projects and tasks seems to be reporting OK as those are hardlinked through relationship but measure is not. And there is also total missing which looks to me wierd.
- rajendraongole12 years ago
Super User
Hi bigk - Ok, i was checking on that only, can you try below one.
Completed Tasks =
VAR CurrentMeetingDate = SELECTEDVALUE('Meeting Dates'[Meeting Date])
VAR PreviousMeetingDate =
CALCULATE(
MAX('Meeting Dates'[Meeting Date]),
FILTER(
ALL('Meeting Dates'),
'Meeting Dates'[Meeting Date] < CurrentMeetingDate
)
)
VAR TasksBetweenDates =
CALCULATETABLE(
'Tasks',
'Tasks'[Completion Date] > PreviousMeetingDate &&
'Tasks'[Completion Date] <= CurrentMeetingDate
)
RETURN
COUNTROWS(TasksBetweenDates)Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!- bigk2 years ago
Helper III
Still same results.
Maybe there is some way to share my pbix to you or it won't help?
- Anonymous2 years agoNot applicable
Hi bigk
Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.