Forum Discussion
Power Query to Find Project Names which do not have update in current month
- Anonymous1 year ago
Hi dbollini,
The error likely occurs because "CONTAINSROW" expects a single-column table or explicit values for each column in the comparison. To fix this, you need to correctly filter "MonthlyUpdates" and check if the "ProjectMaster[ID]" exists in it.
You can also try use EXCEPT or LOOKUPVALUE in place of IN for better logic.ProjectsWithoutUpdate =
VAR SelectedMonth = SELECTEDVALUE(MonthlyUpdates[monthstartdate])RETURN
FILTER(
ProjectMaster,
ProjectMaster[ProjectStatus] IN {"On-Track", "Delayed", "At-Risk"} &&
NOT ISBLANK(
LOOKUPVALUE(
MonthlyUpdates[projectid],
MonthlyUpdates[projectid], ProjectMaster[ID],
MonthlyUpdates[monthstartdate], SelectedMonth
)
)
)If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support TeamIf this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
For the Dax query i am getting this error: The number of arguments is invalid. Function CONTAINSROW must have a value for each column in the table expression.
Hi dbollini,
The error likely occurs because "CONTAINSROW" expects a single-column table or explicit values for each column in the comparison. To fix this, you need to correctly filter "MonthlyUpdates" and check if the "ProjectMaster[ID]" exists in it.
You can also try use EXCEPT or LOOKUPVALUE in place of IN for better logic.
ProjectsWithoutUpdate =
VAR SelectedMonth = SELECTEDVALUE(MonthlyUpdates[monthstartdate])
RETURN
FILTER(
ProjectMaster,
ProjectMaster[ProjectStatus] IN {"On-Track", "Delayed", "At-Risk"} &&
NOT ISBLANK(
LOOKUPVALUE(
MonthlyUpdates[projectid],
MonthlyUpdates[projectid], ProjectMaster[ID],
MonthlyUpdates[monthstartdate], SelectedMonth
)
)
)
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.