Forum Discussion
inglexjc
Post Patron
3 years agoCode to show case active when there is a future date
I have a report that uses this code to show if a case is active or not: End of Service Date/Open = SWITCH( IF( ISBLANK(PBI_TR_Placements_OOH[SERVICE_END_DATE]),0, PBI_TR_Placements_OOH[SERVIC...
- Anonymous3 years ago
Hi inglexjc ,
Please try to create a new column with below dax formula:
Column = VAR _a = IF ( ISBLANK ( [Date] ), 0, [Date] ) VAR _b = SWITCH ( TRUE (), _a = 0, "Active", NOT ( ISBLANK ( [Date] ) ) && [Date] > TODAY (), "Active", FORMAT ( [Date], "short date" ) ) RETURN _bPlease refer the attached .pbxi file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
3 years agoinglexjc , I have created an active/current employee measure using start and end dates, which should help
Power BI: HR Analytics - Employees as on Date: https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU
The sample file is attached