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
OvidiuNeacsu
Resolver I
Resolver I

SUM all subjects IF 2 date columns are equal by day, but not by time

Hello everyone, 

 

I'm trying to count how many candidates were never touched in a Vacancy since they applied. I have 2 date/time columns that can tell me that. One is the Candidate Submitted Date (Candidate_SubmittedDate) and the other is Moved to Date (Candidate_CurrentFolder_SetOn). If they match, then the candidate was never touched. 

 

The way I would do it is like the formula below, but given the fact that these fields contain DATE and TIME they will never match as the system does the 2 processes withing a few seconds apart. Is there a way to compare only the DATES in a Measure? Or I need to go in Power Query and change Type or split columns? 

 

_Candidate_Never_Moved = SUMX(report, IF([Candidate_SubmittedDate]=[Candidate_CurrentFolder_SetOn], 1, 0))
 
Do you have any ideas? Thank you very much,
Ovidiu
2 ACCEPTED SOLUTIONS
vik0810
Resolver V
Resolver V

Hi @OvidiuNeacsu,

 

you can use following formula

 

_Candidate_Never_Moved =
SUMX (
    report,
    IF (
        [Candidate_SubmittedDate].DATE = [Candidate_CurrentFolder_SetOn].DATE,
        1,
        0
    )
)

View solution in original post

Found the issue it's [Candidate_SubmittedDate].[Date]

 

PBIDesktop_b2Vq86ILiw.png

 

Thank you very much! 

Highly appreciated,

Ovidiu

View solution in original post

4 REPLIES 4
vik0810
Resolver V
Resolver V

Hi @OvidiuNeacsu,

 

you can use following formula

 

_Candidate_Never_Moved =
SUMX (
    report,
    IF (
        [Candidate_SubmittedDate].DATE = [Candidate_CurrentFolder_SetOn].DATE,
        1,
        0
    )
)

Found the issue it's [Candidate_SubmittedDate].[Date]

 

PBIDesktop_b2Vq86ILiw.png

 

Thank you very much! 

Highly appreciated,

Ovidiu

Tried to reverse the fields... They are both DATE/TIME, i don't know why the 2nd appears as grey. 

PBIDesktop_MIC9EKca6w.png

hi @vik0810 

 

I've tried that, but it gives me an error. Not sure where i make a mistake here: 

 

PBIDesktop_qKAZIfm9TA.png

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.