Forum Discussion
CountX + filter when filter condition is in another table - Directquery
Hi there. Likely a newb question, and I don't even know if I'm on the right track here, but I'm basically trying to get a count of tasks in a "tasks" table where related opportunity status in "opportunities" table = "won". This is what I'm trying:
COUNTX(filter(enhancedopportunity,enhancedopportunity[StateCodevalue]="Won"),enhancedtask[MeasureCountTasks])
but I seem to be getting the following error:
"Function 'COUNTX' is not supported in this context in DirectQuery mode."
My end goal is to get a % total of tasks where regarding opportunity status = "won"... or % of total tasks that result in won opportunities and my thought was to keep it simple by getting counts in two new columns and then divide one column by the other. There may be another way to accomplish this that my newbie brain can't fathom :)
Any help would be greatly appreciated. Thanks!
1 Reply
- v-chuncz-msftCommunity Support