Forum Discussion
waleed111
5 years agoHelper V
CALCULATE
I made this formula:
Total = CALCULATE(DISTINCTCOUNT('All Manufacturings (4)'[Serial Number]), YEAR('All Manufacturings (4)'[Added Time])=YEAR('date'[Date]))
but it didn't work and show me this error:
The expression contains multiple columns, but only a single column can be used in a True/False expression that is used as a table filter expression.
what is the problem?
2 Replies
- VijayPCommunity Champion
Use Filter(All(Table),filter context)
- v-jingzhangCommunity Support
Hi waleed111 @, try measure like below
Total = VAR __year = YEAR(MAX('date'[Date])) RETURN CALCULATE(DISTINCTCOUNT('All Manufacturings'[Serial Number]),YEAR('All Manufacturings'[Added Time])=__year)I use MAX function for example because I am not sure what year value you need for this measure in case there may be more than one year value in the date table. You can modify the variable as you like to get the year value you want.
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.