Forum Discussion

LABrowne's avatar
LABrowne
Helper II
2 years ago
Solved

Count rows based on multiple measures

Hello,

 

I am trying to count the number of 'Hot Orders' where the following criteria below:

 

[SpicyLevel (%)] > 1 && [No. of Orders] >= 2 && TODAY() <= [Expiry Date Less 90 Days]
 
How do I combine the 3 conditions to count them?
 
Any advice much appreciated.
 
Kind regards,
Luke
  • HI, LABrowne 

     

    this error occure when use measure as comparing value
    try below code 

     

    CALCULATE (
        COUNT ( Table[Column] ),
        filter('table',[SpicyLevel (%)] >1 &&[No. of Orders] >= 2 &&
        TODAY () <= [Expiry Date Less 90 Days])
    )

     

    same problem solved
    visit HERE 

     

3 Replies

  • ERD's avatar
    ERD
    Community Champion

    Hi LABrowne , Calculate might help you.

    your_measure =
    CALCULATE (
        COUNT ( Table[Column] ),
        [SpicyLevel (%)] > 1,
        [No. of Orders] >= 2,
        TODAY () <= [Expiry Date Less 90 Days]
    )
    
    • LABrowne's avatar
      LABrowne
      Helper II

      Hi there,

       

      Unfortunately I get the following error:

       

      "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

      • Dangar332's avatar
        Dangar332
        Resident Rockstar

        HI, LABrowne 

         

        this error occure when use measure as comparing value
        try below code 

         

        CALCULATE (
            COUNT ( Table[Column] ),
            filter('table',[SpicyLevel (%)] >1 &&[No. of Orders] >= 2 &&
            TODAY () <= [Expiry Date Less 90 Days])
        )

         

        same problem solved
        visit HERE