Forum Discussion
Ayush001
4 years agoMicrosoft Employee
How 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
- amitchandakSuper User
Ayush001 , Try like
CALCULATE(IF( isblank(Max('Exceptions'[RCATitle])),DISTINCTCOUNT('Exceptions'[Remark]),DISTINCTCOUNT('Exceptions'[RCATitle])),
filter(Exceptions, Exceptions[SnapshotDate]=MAX('Exceptions'[SnapshotDate])))- Ayush001Microsoft Employee
It worked.
Thanks.