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
vjnvinod
Impactful Individual
Impactful Individual

help to tweak current Measure

Dear all

 

Below is my current measure

Preboarding Pipeline1 = COUNTA('Onboarding Report'[Employee Name])+CALCULATE(COUNTA('Experienced Hired Report'[Location City]),'Experienced Hired Report'[Status]="Under offer")+CALCULATE(COUNTA('Campus Hire Report'[Location City]),'Campus Hire Report'[Status]="Under offer")-CALCULATE(COUNTA('Onboarding Report'[Employee Name]),'Onboarding Report'[Employee Category]="Internal Transfer")
 
Basically the outlined in red  in my measureshould be transformed to Contains, i need employee category contains Internal transfer, how do i change it?
 
 
1 ACCEPTED SOLUTION

Hi @vjnvinod ,

 

Please try this formula.

Preboarding Pipeline1 = 
COUNTA('Onboarding Report'[Employee Name])+
CALCULATE(
    COUNTA('Experienced Hired Report'[Location City]),
    'Experienced Hired Report'[Status]="Under offer"
)+
CALCULATE(
    COUNTA('Campus Hire Report'[Location City]),
    'Campus Hire Report'[Status]="Under offer"
)-
CALCULATE(
    COUNTA('Onboarding Report'[Employee Name]),
    FILTER(
        ALL('Onboarding Report'),
        CONTAINSSTRING(
            'Onboarding Report'[Employee Category],
            "Internal Transfer"
        ) = TRUE()
    )
)

CONTAINSSTRING function (DAX) - DAX | Microsoft Docs

 

Best regards,
Lionel Chen

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

 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@vjnvinod , search can do ?

example

search("Internal Transfer",'Onboarding Report'[Employee Category],,0)>0

@amitchandak , some syntax error its throwing up, see below

 

Capture.PNG

vjnvinod
Impactful Individual
Impactful Individual

I think i manage to fingure it out

 

Preboarding Pipeline1 = COUNTA('Onboarding Report'[Employee Name])+CALCULATE(COUNTA('Experienced Hired Report'[Location City]),'Experienced Hired Report'[Status]="Under offer")+CALCULATE(COUNTA('Campus Hire Report'[Location City]),'Campus Hire Report'[Status]="Under offer")-CALCULATE(COUNTA('Onboarding Report'[Employee Name]),FILTER('Onboarding Report',FIND("Internal Transfer",'Onboarding Report'[Employee Category],,0)<>0))

Hi @vjnvinod ,

 

Please try this formula.

Preboarding Pipeline1 = 
COUNTA('Onboarding Report'[Employee Name])+
CALCULATE(
    COUNTA('Experienced Hired Report'[Location City]),
    'Experienced Hired Report'[Status]="Under offer"
)+
CALCULATE(
    COUNTA('Campus Hire Report'[Location City]),
    'Campus Hire Report'[Status]="Under offer"
)-
CALCULATE(
    COUNTA('Onboarding Report'[Employee Name]),
    FILTER(
        ALL('Onboarding Report'),
        CONTAINSSTRING(
            'Onboarding Report'[Employee Category],
            "Internal Transfer"
        ) = TRUE()
    )
)

CONTAINSSTRING function (DAX) - DAX | Microsoft Docs

 

Best regards,
Lionel Chen

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

 

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.