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

Unable to retriew people hired from a relative date from a segment

Hello, 

I have been breaking my mind trying to retriew the correct value from the people hired in a company between different marked dates, however the value of the meassure is correct when selecting current time (today), but when trying to select dates behind today, weird thing happens like giving 3 employees when should be around 40 or so, have been checking all these posts and they didn't help. I think it is important to address that when values in end date should be blank it is reflected as 1/1/1753 on the table in power bi from the database, anyway I have this in mind on the formulas and I add a code like "|| Table[end date]= Date(1753,1,1)" to all the formulas I tried.

 

 

 

https://community.powerbi.com/t5/Desktop/Copy-column-and-set-date-to-End-of-Month/m-p/115042#M48470

https://community.powerbi.com/t5/Desktop/HR-Dashboard-filtered-by-date/m-p/829681#M398584

 

I will keep trying mean while, waiting for your answer guys! 

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Sorry maybe I don't understand your problem correctly. Is your main problem to avoid blank values becoming 1/1/1753? How about add a if condition in the formula.

IF(ISBLANK(Table[end date]),something you want to show,Table[end date])

If it does not help, could you please explain more about it?

 

Best Regards,
Community Support Team _ kalyj

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

Anonymous
Not applicable

Hello! I solved this issue already, the problem was related to linking wrongly some tables, but now I'm trying to resolve the issue of not counting employees that belong to diferent proyects, so that a different employee can be counted several times due to different entries, but it should counted only as one.

how could I face that? I know the function DISTINTCOUNT, however I don´t know how to apply it to my current formula:

 CALCULATE(COUNTX(
        FILTER('ACAYA$Histórico de contratos',
        'ACAYA$Histórico de contratos'[Fecha alta] <=SELECTEDVALUE(Fechas[Date])

 

        &&  (ISBLANK('ACAYA$Histórico de contratos'[Fecha baja])  

 

        ||  'ACAYA$Histórico de contratos'[Fecha baja]>SELECTEDVALUE(Fechas[Date]))
            )
     ,'ACAYA$Histórico de contratos'[Cód empleado])
       

     ,CROSSFILTER('ACAYA$Histórico de contratos'[Fecha alta],'Fechas'[Date],None))

 

thank you

Anonymous
Not applicable

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.