Forum Discussion
Ayush001
Microsoft Employee
4 years agoHow to
# Scenarios in Exception = CALCULATE(IF(Values('Exceptions'[RCATitle])=Blank(),DISTINCTCOUNT('Exceptions'[Remark]),DISTINCTCOUNT('Exceptions'[RCATitle])),Exceptions[SnapshotDate]=MAX('Exceptions'[SnapshotDate]))
An error is coming that I am passing a table, where single value is expected.
Please suggest
Ayush001 , Try like
CALCULATE(IF( isblank(Max('Exceptions'[RCATitle])),DISTINCTCOUNT('Exceptions'[Remark]),DISTINCTCOUNT('Exceptions'[RCATitle])),
filter(Exceptions, Exceptions[SnapshotDate]=MAX('Exceptions'[SnapshotDate])))
2 Replies
- amitchandak
Super User
Ayush001 , Try like
CALCULATE(IF( isblank(Max('Exceptions'[RCATitle])),DISTINCTCOUNT('Exceptions'[Remark]),DISTINCTCOUNT('Exceptions'[RCATitle])),
filter(Exceptions, Exceptions[SnapshotDate]=MAX('Exceptions'[SnapshotDate])))- Ayush001
Microsoft Employee
It worked.
Thanks.