Skip to main content

How would you only show the count of returns for 2017 for all segments with the visual below?

 

First() or Index() Function for Table calculation? 

Which one is correct?

  1. If First()=0 THEN Count([Returns]) END
  2. IF Index() = 1 THEN Count([Returns]) END 

 

Sort of confused with the First function.

3 answers
  1. May 4, 2023, 5:17 AM

    Hello @Richard S.​ 

    As per the question you've asked "how to only show the count of returns for 2017 for all segments", for this you can simply put "Ship Date" into filter and filter out the years which are not required.

     

    And for the function first() and index() you refer to this documentation.

    https://help.tableau.com/current/pro/desktop/en-us/functions_functions_tablecalculation.htm#:~:text=available%20in%20Tableau-,FIRST(%20),first%20row%20in%20the%20partition.

    Hope this solves your problem.

    Regards

    Divas Pratap Singh

0/9000