
How would you only show the count of returns for 2017 for all segments with the visual below?
Which one is correct?
- If First()=0 THEN Count([Returns]) END
- IF Index() = 1 THEN Count([Returns]) END
Sort of confused with the First function.
3 answers
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