Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I cannot seem to find a solution to this! This is quite tricky and complicated as it involves 3 different scenarios with static and dynamic end date.
If the cell is blank, use the date filter and the 'Start Date' but if there is a value, use that value as an end date but use the 'First Hire' date instead. I cannot turn it into a calculated column because the end date must be based on the date filter. I've attached a screenshot of the excel file as reference.. From what I read, calculated columns in power bi is static so I'm not sure if I should use one in here as the months in position is based on the date filter.
This is similar to the post found in the link below but mine involves an end date that varies depending on the scenario.
https://community.powerbi.com/t5/Desktop/Dynamic-Age-Calculation-Based-on-User-Selected-Cutoff-Date/...
Solved! Go to Solution.
Hi @amitchandak. I was close enough. I still have another issue. I have multiple rows of data on of each person. I had tried changing your code:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |