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

Need Calculated column for IF one EmpId has one value then NEW else Old

Hi All,

My condition here if one Emp Id have one Login Id then its New if the same EmpId have two LoginId then Old need to show in separate column

Need Calculated column for this condition any help 

My Data Is like dis 

 

EmpId LoginIDStaff IdCalculation Column 
1768241109099588NEW
1768241109099589NEW
345899689447383NEW
345899689447384NEW
71038397138326615OLD
71038397138326616OLD
7767451109023218OLD
7767451109023219OLD
7981640130411211OLD
7767451129916202OLD
447544190549143New
447544189919587New
447544189919588New
546183189599513New
546183189599514New
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Venkateswara_ra 

please try this

Column = if(CALCULATE(DISTINCTCOUNT('Table'[LoginID]),ALLEXCEPT('Table','Table'[EmpId ]))=1,"new","old")

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Venkateswara_ra , Create a new column as

if(countx(filter(Table,[Staff Id] =earlier([Staff Id])),[LoginID])+0=1, "New","Old")

ryan_mayu
Super User
Super User

@Venkateswara_ra 

please try this

Column = if(CALCULATE(DISTINCTCOUNT('Table'[LoginID]),ALLEXCEPT('Table','Table'[EmpId ]))=1,"new","old")

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.