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
Anonymous
Not applicable

Finding Duplicate Names with Different Status

Hi, 

 

I have a requirement to showcase on a table employees who went from contractor to full time.

How can I achieve this? Is there a DAX to create a count or highlight those names which converted?

 

NameHire DateStatus
Mary Jane1/1/2019Contractor
Mary Jane1/1/2020FTE
Gary Smith11/1/2018Contractor
Bob Ferguson12/1/2016Contractor
Bob Ferguson06/01/2018FTE
1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a measure like below and add it to visual filter then configure the condition formatting like below.

Measure = CALCULATE(DISTINCTCOUNT('Table'[Status]),ALLEXCEPT('Table','Table'[Name]))

7.PNG

Result would be shown as below.

8.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

7 REPLIES 7
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a measure like below and add it to visual filter then configure the condition formatting like below.

Measure = CALCULATE(DISTINCTCOUNT('Table'[Status]),ALLEXCEPT('Table','Table'[Name]))

7.PNG

Result would be shown as below.

8.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
AlB
Super User
Super User

Hi @Anonymous 

You can create a new table:

Converted =
FILTER (
    DISTINCT ( Table1[Name] );
    VAR LastDate_ =
        CALCULATE ( MAX ( Table1[Hire Date] ) )
    VAR IsFTEOnLastDate_ =
        CALCULATE (
            COUNT ( Table1[Hire Date] );
            Table1[Hire Date] = LastDate_;
            Table1[Status] = "FTE"
        ) > 0
    VAR WasPreviouslyContractor_ =
        CALCULATE (
            COUNT ( Table1[Hire Date] );
            Table1[Hire Date] <= LastDate_;
            Table1[Status] = "Contractor"
        ) > 0
    RETURN
        AND ( IsFTEOnLastDate_; WasPreviouslyContractor_ )
)

where Table1 is the table you show

Please mark the question solved when done and consider giving kudos if posts are helpful.

 Cheers 

SU18_powerbi_badge

 

 

Anonymous
Not applicable

 

You need to use the name of your table in lieu of Table1 and perhaps commas instead of ";" depending on your locale

Please mark the question solved when done and consider giving kudos if posts are helpful.

 Cheers 

SU18_powerbi_badge

See it at work in the attached file

Please mark the question solved when done and consider giving kudos if posts are helpful.

 Cheers 

SU18_powerbi_badge

 

 

nandukrishnavs
Super User
Super User

@Anonymous 

 

Try this measure

 

contractortofulltime = 
var _isContractor= CALCULATE(COUNT('Table'[Status]),'Table'[Status]="Contractor")
var _isFulltime= CALCULATE(COUNT('Table'[Status]),'Table'[Status]="Full Time")
var _contractortofulltime = IF(_isContractor>0&&_isFulltime>0,"Yes","No")
return _contractortofulltime

 

 

Capture.JPG

Now you can apply this measure in visual level filter ( is Yes ). 

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

@Anonymous  is it not working?


Regards,
Nandu Krishna

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.