Forum Discussion
Anonymous
6 years agoNot applicable
count names on a specific day
I want to count the names on a chosen day from date table.
Measure=
var a=selectvalue('date'[date])
return
calculate(count(names),a>startdate&&a<enddate)
The error message is
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
What did I do wrong?
- You need to use a filter in your second statement of the calculate expression.
calculate(count(names),filter(table, a>startdate&&a<enddate))
If this answered your question, please mark it as the solution. Kudos are welcome! 🙂
1 Reply
- JarroVGITResident RockstarYou need to use a filter in your second statement of the calculate expression.
calculate(count(names),filter(table, a>startdate&&a<enddate))
If this answered your question, please mark it as the solution. Kudos are welcome! 🙂