Forum Discussion

Ayush001's avatar
Ayush001
Microsoft Employee
4 years ago
Solved

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

  • Ayush001 , Try like

     


    CALCULATE(IF( isblank(Max('Exceptions'[RCATitle])),DISTINCTCOUNT('Exceptions'[Remark]),DISTINCTCOUNT('Exceptions'[RCATitle])),
    filter(Exceptions, Exceptions[SnapshotDate]=MAX('Exceptions'[SnapshotDate])))