Forum Discussion
findout date difference between two dates and non dates
MahamoodBi I can't provide you with a specific solution without sample data to build a model out and code it. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
| Emp.No | Valid From | Valid To | Service.Date | TermDate |
| 15833 | 01-09-2014 00:00 | 03-11-2014 00:00 | 01-04-2014 | 28-04-2022 |
| 04-11-2014 00:00 | 08-01-2015 00:00 | |||
| 09-01-2015 00:00 | 31-03-2015 00:00 | |||
| 19031 | 11-04-2019 00:00 | 31-10-2020 00:00 | 11-04-2022 | |
| 01-11-2020 00:00 | 06-07-2021 00:00 | |||
| 07-07-2021 00:00 | 11-04-2022 00:00 | |||
| 16097 | 06-10-2014 00:00 | 03-11-2014 00:00 | 06-10-2014 | 12-05-2022 |
| 04-11-2014 00:00 | 11-06-2015 00:00 | |||
| 12-06-2015 00:00 | 31-03-2016 00:00 | |||
| 11821 | 21-01-2008 00:00 | 24-06-2008 00:00 | 12-04-2022 | |
| 25-06-2008 00:00 | 30-09-2008 00:00 | |||
| 01-10-2008 00:00 | 31-10-2008 00:00 | |||
| 01-11-2008 00:00 | 31-12-2008 00:00 |
pls check the sample data
1.i need to findout date difference between service date and term date.
2 if service date column is empty we should find date difference between Valid from(least value) and term date
3, above two condition should be single formula
thanks
.