Forum Discussion
Search a specific table based on a value
- 2 years ago
NewbieQA - Firstly you should add a project column to each sprint table, then append all of them together in Power Query, this will make the DAX much less complex. Here's some guidance on that: https://learn.microsoft.com/en-us/power-query/append-queries
Once that is done, you can create a variable for the selected sprint,
VAR _project = SELECTEDVALUE( 'Sprint table'[Project] )and add that into your FILTER conditions:
FILTER( 'Sprint Table', AND( 'Sprint table'[Start Date] <= __ClosureDate, __ClosureDate <= 'Sprint Table'[End Date], 'Sprint table'[Project] = _project ) )You might need to change the 'Sprint table' for your 'Main table' columns in this filter code - depending on how your relationships are working.
If this works, please accept as the solution, it helps with visibility for others with the same challenge.
- 2 years ago
NewbieQA - Just change the filter argument to this:
FILTER( 'Sprint Table', 'Sprint table'[Start Date] <= __ClosureDate && __ClosureDate <= 'Sprint Table'[End Date] && 'Sprint table'[Project] = _project )If this works, please accept as the solution, it helps with visibility for others with the same challenge.
Hello mark_endicott
Thank you for your quick feedback.
Indeed merging the DB's helped but it seems I cannot add this
Without triggering an error since im now providing more arguments than what the "AND" function can handle.
Any ideas on how to work around this? I've tried a couple of possible solutions but unable to sort this out.
NewbieQA - Just change the filter argument to this:
FILTER(
'Sprint Table',
'Sprint table'[Start Date] <= __ClosureDate &&
__ClosureDate <= 'Sprint Table'[End Date] && 'Sprint table'[Project] = _project
)
If this works, please accept as the solution, it helps with visibility for others with the same challenge.