Forum Discussion

raymondxie's avatar
raymondxie
Helper II
9 years ago
Solved

Filter with calculated measures

I have a table on a database which contains a field Validated of varchar.

 

I need to count the number of records with [Validated] == 'Y', I created a measure with the following formula:

Validated = CALCULATE ( Count (Result[ID]), FILTER ( Result, [Validated] == 'Y') ) 

 

I got this error message:

 

 

Can anyone tell me what am I missing here and how to fix it?

 

Thank you very much.

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion
    Validated = CALCULATE ( Count (Result[ID]), FILTER ( Result, [Validated] = "Y") ) 
    • raymondxie's avatar
      raymondxie
      Helper II

      Thank you Greg_Deckler,

       

      I got the following number which doesn't seem to be a count result but rather a sum result:

       

      The count should be something less than 50000

      • raymondxie's avatar
        raymondxie
        Helper II

        I changed from creating column to creating measure and it works now, thank you very much. Greg_Deckler