0 votes
How to get distinct customers this year with respect to previous year? I'm using global superstore data set.
May 16, 2019 in Tableau 575 views

## 1 answer to this question.

0 votes
Follow the below steps:

1. Create calculated fields to a group of n depending on years.

2. Create a parameter for selecting the current year.

3. Now create another calculated field to check current year vs previous year as if the order date is equal to the current year -1 then the customer is an existing customer else a new customer.

IF YEAR([Order Date]) = YEAR([Current Date])-1 THEN "EXISTING CUST"
ELSE [Customer ID]
END

Hope it helps you.
answered May 17, 2019 by
• 33,030 points

0 votes
1 answer

## how to get the count of non zero values in a row

In first part you should solve the ...READ MORE

0 votes
1 answer

## How to get Tableau results in python?

Well even I was looking for the ...READ MORE

0 votes
1 answer

## How to use LOD to count distinct number of records based on some condition?

From the desired output it seems that ...READ MORE

0 votes
1 answer

## How to change months for a calendar year

Hey, you can try this & Change ...READ MORE

0 votes
1 answer

## How to determine average per event by year?

Hi Roshan, Create a new calculated field (use ...READ MORE

0 votes
0 answers

## Calculating count average from averages

I've a calculated field in Tableau which ...READ MORE

0 votes
1 answer

## How to return the value on which the condition is met for the first time?

It looks like you are trying to ...READ MORE

0 votes
1 answer

## How to Split a Measure in Tableau?

Have you tried using an IF statement: IF ...READ MORE

0 votes
1 answer

## How to compare sales of today with previous year?

Create a calculative field as, IF YEAR(TODAY())=YEAR([DATE_FIELD]+1 AND ...READ MORE

0 votes
1 answer

## How to get past N months date from data source?

Hi, this is a one solution to your ...READ MORE