Forum Discussion
Anonymous
6 years agoNot applicable
Error Multiple columns cannot be converted to a scalar value
Hello,
I am attempting to gather a total occurance of an amount of tickets using a distinct values in a column which works great.
But when I add filtering on which Year to sort my results on fails evertime with error "Multiple columns cannot be converted to a scalar value" (see DAX code below).
Is there a way to gather the total occurances using a distinct values in a column and then filter a Date or Year?
Thank you in advance.
CritSitTeamCount =
CALCULATE(
DISTINCTCOUNT( 'CRITSITS'[Ticket ID] )
,RIGHT('CRITSITS'[CritSit Event Type],6) = "Metric"
),
FILTER('CRITSITS', 'CRITSITS'[Year]) = 2020 )
Anonymous
Try like
CritSitTeamCount = CALCULATE( DISTINCTCOUNT( 'CRITSITS'[Ticket ID] ) ,RIGHT('CRITSITS'[CritSit Event Type],6) = "Metric", FILTER('CRITSITS', 'CRITSITS'[Year] = 2020 ) ) OR CritSitTeamCount = CALCULATE( DISTINCTCOUNT( 'CRITSITS'[Ticket ID] ) ,RIGHT('CRITSITS'[CritSit Event Type],6) = "Metric", 'CRITSITS'[Year] = 2020 )if you need more help make me @
Appreciate your Kudos.
2 Replies
- amitchandak
Super User
Anonymous
Try like
CritSitTeamCount = CALCULATE( DISTINCTCOUNT( 'CRITSITS'[Ticket ID] ) ,RIGHT('CRITSITS'[CritSit Event Type],6) = "Metric", FILTER('CRITSITS', 'CRITSITS'[Year] = 2020 ) ) OR CritSitTeamCount = CALCULATE( DISTINCTCOUNT( 'CRITSITS'[Ticket ID] ) ,RIGHT('CRITSITS'[CritSit Event Type],6) = "Metric", 'CRITSITS'[Year] = 2020 )if you need more help make me @
Appreciate your Kudos.- AnonymousNot applicable
Thank you very much, your solutions worked great as expected.
Best regards,
Don