5 Replies Latest reply on Oct 21, 2017 8:59 AM by Branden Kornell

    Count # of Stores When Calculated Field Value <0 ?

    Christopher Ribeiro

      hi all:

       

      I'm trying to count how many stores have a '% Change' less than 0% - for my example below, my expected answer is a count of 1.

       

      I'm expecting to create some form of a COUNT calculated field that takes into consideration the condition that the % Change is <0.

       

      I have a few columns of data:

       

      Store Name
      TY Sales
      LY Sales
      % Change - TY/LY
      A10090.11
      B10090.11
      C8090-.11

       

      My end goal would be to have a calculated field that would look like this when added to my shelf:

       

      Count of Stores with Negative Change
      1

       

      I'm not really sure where to start - in SAP BusinessObjects it might look something like this - but this is not a valid function in Tableau:

       

      count([Store Name] WHERE [%Change - TY/LY] < 0)

       

      I appreciate any insight you guys might have!