Forum Discussion
Anonymous
5 years agoNot applicable
Days Difference between two dates in same column with duplicate dates in Power BI
I have a column with duplicate dates. I need to calculate date difference based on another column. For example, I have Stage column with 1,2,3... repeated values . What will be function I can use to...
- 5 years ago
Anonymous
maybe you can try this
measure=calculate(max(lastdate),allexcept(table,bomno))-calculate(min(lastdate),allexcept(table,bomno))
- Anonymous5 years ago
Thanks a lot. It worked for me...😊
Augustinas
2 years agoFrequent Visitor
| ID | Received date and time | New Value | Date and time. | CAD status min. |
| 18743 | 2024-05-02 14:08 | PAKLAUSIMAS | 5-2-2024 3:12:14 PM | |
| 18743 | 2024-05-02 14:08 | CAD | 5-2-2024 5:08:48 PM | 985 |
| 18743 | 2024-05-02 14:08 | SĄMATOS RUOŠIMAS | 5-3-2024 9:34:08 AM | |
| 18743 | 2024-05-02 14:08 | PASIŪLYMO RUOŠIMAS | 5-3-2024 9:34:30 AM | |
| 18743 | 2024-05-02 14:08 | CAD | 5-3-2024 11:11:37 AM | 129 |
| 18743 | 2024-05-02 14:08 | SĄMATOS RUOŠIMAS | 5-3-2024 1:21:30 PM | |
| 18743 | 2024-05-02 14:08 | MARŽOS NUSTATYMAS | 5-7-2024 8:26:21 AM | |
| 18743 | 2024-05-02 14:08 | PASIŪLYMO PATIKRINIM | 5-7-2024 10:04:43 AM | |
| 18743 | 2024-05-02 14:08 | PASIŪLYMO RUOŠIMAS | 5-7-2024 5:27:10 PM | |
| 18743 | 2024-05-02 14:08 | PASIŪLYMAS IŠSIŲSTAS | 5-7-2024 7:43:07 PM |
E.g. SĄMATOS RUOŠIMAS (5-3-2024 9:34:08 AM) minus CAD (5-2-2024 5:08:48 PM) is 985 minutes.
Ashish_Mathur
2 years agoSuper User
Hi,
This calculated column formula works
Column = if(Data[New Value]="CAD",24*60*(CALCULATE(MIN(Data[Date and time]),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Date and time]>EARLIER(Data[Date and time])&&Data[New Value]="SĄMATOS RUOŠIMAS"))-Data[Date and time]),BLANK())
Hope this helps.
- Augustinas2 years agoFrequent Visitor
Thank You !