1 Reply Latest reply on Nov 12, 2016 5:46 AM by Chris McClellan

    Sum IF function in tableau as excel

    Pavan Kancharala

      I am recently working on a problem, where I got the solution in excel please help me replicating it in excel

      Firstly I have two columns Date, sales for example.

      • Date: consists of every week start date ie. Monday of every week for 1 year 2015
      • Sales: some number based on sales corresponding to date.

      Now if a user select particular date I should show before and after sales with respect to that date please see the below example

      Date

      Sales

      Before

      after

      10/04/15

      0

      0

      168

      10/04/15

      26

      0

      168

      10/04/15

      2

      26

      168

      10/04/15

      8

      28

      142

      10/04/15

      2

      36

      114

      10/04/15

      2

      38

      78

      10/04/15

      1

      40

      40

       

      • Before: sum sales column if date < selected date
      • After: sum sales column if date >= selected date
      • For this is have used “sumif()” function in excel please help me to replicate this in tableau I am using Tableau 10