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.
Hello.
I have 2 columns with the following data: picking date and faturation date. I want to know the time difference between these two processes but in some rows I dont have the picking date and in some rows I dont have the faturation date. So, I only want the time difference between orders that have the 2 fields and if I dont have at least one field in one column, I want a message like "without dates".
Anyone can help?
Solved! Go to Solution.
Dear @Anonymous
You can use this measure
This will work the best and also you will be able to filter by field using any drop down or slicer
This will do the job
Just use your table name in the place where i have used Sheet1
I would appreciate a kudos and if this helped please accept as solution so our other brothers and sisters can get help from it 👍
If any more further doubt please let me know .
Regards
Thakur Sujit
Hi @Anonymous ,
Try creating a Calculated Column
New Column =
IF (
'Table'[picking date]
<> BLANK ()
&& 'Table'[faturation date]
<> BLANK (),
DATEDIFF (
'Table'[picking date],
'Table'[faturation date],
DAY
),
99999
)
If any of the dates are not present it will return 99999. YOu cannot have text and number values in the same column.
Regards,
Harsh Nathani
This solved my problem: https://community.powerbi.com/t5/Desktop/Datediff-start-date-cannot-be-greater-than-the-end-date/td-...
Thank you all.
Dear @Anonymous ,
You can please atleast appreciate the solution authors by giving kudos .
Both of above post are also correct solution , you can accept both of them as solution if you want.
Regards ,
thakur sujit
Dear @Anonymous
You can use this measure
This will work the best and also you will be able to filter by field using any drop down or slicer
This will do the job
Just use your table name in the place where i have used Sheet1
I would appreciate a kudos and if this helped please accept as solution so our other brothers and sisters can get help from it 👍
If any more further doubt please let me know .
Regards
Thakur Sujit
Hi @Anonymous ,
Try creating a Calculated Column
New Column =
IF (
'Table'[picking date]
<> BLANK ()
&& 'Table'[faturation date]
<> BLANK (),
DATEDIFF (
'Table'[picking date],
'Table'[faturation date],
DAY
),
99999
)
If any of the dates are not present it will return 99999. YOu cannot have text and number values in the same column.
Incase you need time difference in hour, second, minutes, weeks replace DAY by them. Refer the below guide
Regards,
Harsh Nathani
Hi @Anonymous ,
Try creating a Calculated Column
New Column =
IF (
'Table'[picking date]
<> BLANK ()
&& 'Table'[faturation date]
<> BLANK (),
DATEDIFF (
'Table'[picking date],
'Table'[faturation date],
DAY
),
99999
)
If any of the dates are not present it will return 99999. YOu cannot have text and number values in the same column.
Regards,
Harsh Nathani
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
39 | |
25 | |
20 | |
14 | |
8 |
User | Count |
---|---|
71 | |
47 | |
46 | |
20 | |
16 |