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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Farhana110
Frequent Visitor

Calculated column using DAX

Hi 

I am trying to create a column " Eligible"using dax. I have lead ID column in my table. If this column contains duplicate lead is then 1 St captured lead id should be eligible and other should be in eligible.for example if ID 4566 repeated 3 times ID 4566- eligible 

                             ID 4566- Ineligible 

                              ID 4566 - Ineligible 

 

Can anyone advice me on this issue. Thanks !

3 REPLIES 3
Jihwan_Kim
Super User
Super User

HI, 

I am not sure if I understood your question correctly, but I assume your table has a kind of INDEX column that defines which one is the first one and which ones are not the first one.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1683269335767.png

 

Expected result CC =
VAR _firstindex =
    MAXX (
        INDEX (
            1,
            SUMMARIZE ( Data, Data[Lead ID], Data[Index] ),
            ORDERBY ( Data[Index], ASC ),
            KEEP,
            PARTITIONBY ( Data[Lead ID] )
        ),
        Data[Index]
    )
RETURN
    IF ( Data[Index] = _firstindex, "Eligible", "Ineligible" )

 


 

    Microsoft MVP
 

 

   


      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.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


Hi jihwan, 

 

Thank you so much for your support, DAX is working properly. Could you please help to combine two more condition in above DAX,

1. When payout in local currency =0 and payout in USD = 0 then " ineligible Emp not found"

2.when lead id " L/CR-000000000" or lead id =L/CR - 00000001 then ineligible, duplicate customer 

Else eligible

Hi,

Please share your sample pbix file's link.

Thank you.


 

    Microsoft MVP
 

 

   


      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.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors