cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User II
Super User II

@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
Super User IV
Super User IV

@Venkateswara_ra , Create a new column as

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Super User II
Super User II

@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

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors