Forum Discussion
awitt
7 years agoHelper III
Unique Value Count
Looking to create a measure or a column that identifies when a value reoccurs within a data set but isolates the multiple times it shows up in one unique occurance. Basically i am looking to ret...
- 7 years ago
I just reproduced your data set and, using this code, see this:
New/Recurring = VAR EarliestDate = CALCULATE( MIN( Table2[date] ), ALLEXCEPT( Table2,Table2[Customer #] ) ) RETURN IF( SELECTEDVALUE( Table2[date] ) = EarliestDate, "New", "Returning" )Are you using the date column in the table with the rest of the data or a date table? The way the measure works is to find the the unique earliest date for each Customer. Not sure how a date table would impact this.
MitchM
7 years agoResolver II
I just reproduced your data set and, using this code, see this:
New/Recurring =
VAR EarliestDate =
CALCULATE(
MIN( Table2[date] ),
ALLEXCEPT( Table2,Table2[Customer #] )
)
RETURN
IF(
SELECTEDVALUE( Table2[date] ) = EarliestDate,
"New",
"Returning"
)
Are you using the date column in the table with the rest of the data or a date table? The way the measure works is to find the the unique earliest date for each Customer. Not sure how a date table would impact this.
awitt
7 years agoHelper III
I think relating the date table is messing something up. When i use the data within this specifc data, your solution works. Thanks!