1 Reply Latest reply on Sep 20, 2017 7:25 AM by patrick.byrne.0

    Need to compare Row values and decide the count in 9.1 version

    Deva S

      Hi,

       

      I am new to tableau, working on a bar chart , that should show the count of insert and delete record count, while showing the count I need to apply a logic based on that my input should taken into account and

      produce the corresponding output.

       

      Below given is  the sample input, I need the output, should display Insert count as 1 for a key field till it hits the first delete and after that regardless of insert record till it finds the next delete record count should be 2 so on.

       

      Could you please help me to get this logic in tableau.

       

      Note: Insert_count and Delete_count in the sample data columns are given for understanding and I don't have that in the input columns. Key field, Time stamp and Action are the only input columns.

       

           

      KeyfieldTimestampActionInsert_CountDelete_Count
      ABC9/12/2017 0:32Insert10
      ABC9/12/2017 0:32Insert10
      ABC9/12/2017 0:44Insert10
      ABC9/12/2017 0:45Delete11
      ABC9/12/2017 0:32Insert21
      ABC9/12/2017 0:32Delete22
      XYZ9/12/2017 0:44Insert32
      XYZ9/12/2017 0:45Insert32
      XYZ9/12/2017 0:32Insert32
      XYZ9/12/2017 0:32Delete33
      Expected Output
      Total Insert Record Count3
      Total Insert Record Count3

       

      Thanks a ton in advance!

        • 1. Re: Need to compare Row values and decide the count in 9.1 version
          patrick.byrne.0

          Hello Deva,

           

          Am I understanding this correctly the idea is to have a bar graph displaying the sample data. But in the actual data table there are only 3 columns. Keyfield, TimeStamp and Action. Then the two additional measures that we want to create is based off of the discount of 'Insert' or 'Delete' commands for each keyfield?

           

          Do you happen to have a workbook which you have started at all? The community can generally provide better assistance to questions with a workbook to go off of.

           

          Cheers.

          Byrne