UNIQUE VALUE Checker in PowerPivot

Jakub

New Member
Joined
Jan 14, 2016
Messages
5
Hey Guys,


Im struggling to figure out a formula that could help me identify the first unique value in a column.

So for example, for names of fruits I would get


Apple 1
Apple 0
Orange 1
Lemon 1
Orange 0


1 - first unique value
0 - if duplicate


Thanks !

Jakub
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hello Jakub,

There is no row order in PP, thus you can't really detect if it's the first time you see an occurrence or not.

To do that you would need to add an index column like that:

Code:
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64"]index[/TD]
[TD="width: 64"]fruits[/TD]
[/TR]
[TR]
[TD="class: xl65"]1[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD="class: xl65"]2[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD="class: xl65"]3[/TD]
[TD]Orange[/TD]
[/TR]
[TR]
[TD="class: xl65"]4[/TD]
[TD]Lemon[/TD]
[/TR]
[TR]
[TD="class: xl65"]5[/TD]
[TD]Orange[/TD]
[/TR]
[TR]
[TD="class: xl65"]6[/TD]
[TD]Apple[/TD]
[/TR]
</tbody>[/TABLE]

Then you would be able to do what you want based on the index order with this formula:


Code:
=IF (
    CALCULATE (
        MIN ( [index] ),
        FILTER ( ALL ( Table1), Table1[fruits] = EARLIER ( Table1[fruits] ) )
    )
        = [index],
    1,
    0
)

Let me know if it helps,
Olivier.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top