Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chandrashekar
Resolver III
Resolver III

First Occurrence : Duplicate

Hello,

 

How to get first occurrence from duplicate based on multi conditions.

 

Regards,

Chandrashekar B

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi,

I do not know what is your expected outcome and how your data model looks like, but I tried to create a sample like below.

Please check the below picture and the attahced pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1663749272515.png

 

First occurrence flag CC = 
IF (
    Data[Index]
        = MINX (
            FILTER ( Data, Data[Category] = EARLIER ( Data[Category] ) ),
            Data[Index]
        ),
    "FLAG"
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hello,

 

Thanks for the solution. However I need based on mutli condition(Attached)

 

File: Sample Data 

Regards,

Chandrashekar B

Hello,

 

I want to add one more condition i.e. field(2nd Condition) = 1 to existing dax.

 

May I know how to do it.

 

Regards,

Chandrashekar B

Hello,

 

Can I add one more condition in Dax formula. i.e. field(2nd Condition) = 1

 

First occurrence flag CC = 
IF (
    Data[Index]
        = MINX (
            FILTER ( Data, Data[Category] = EARLIER ( Data[Category] ) ),
            Data[Index]
        ),
    "FLAG"
)

 

Regards,

Chandrashekar B

Hello,

 

Any solution?

 

Regards,

Chandrashekar B

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors