2 Replies Latest reply on Jan 9, 2019 6:44 AM by CHRISTINE RECORD

    Alternative to Count



      it's me again

      In my last post Count with a condition I asked how I  count the number of truck for each region that took more then 200 minutes.  all the answers was correct:


      IF [real time] > 200 then 1 else 0 end

      and then you can get the number of trucks as



      or using fixed and count


      The problem is when I use the real database at work, tableau don't do it right, sometimes he consider for exemple 274 less then 180( look at the picture), the solution I found is to add sum like this :  IF sum([real time])  > 200 then 1 else 0 end,


      In this case tableau don't give the erreur and consider 274 bigger then 200 (logic)  ,

      But when I add SUM i can't use COUNT or SUM again to count the number of truck , because it's aleready an agregation , for this reason i'm looking for an alternative to count, to count the number of truck, knowing that I have to use SUM to avoid the error (274 < 180)


      Thank You all for your help