Forum Discussion
Tommyvhod
Helper II
6 years agoMeasure to filter days between operations
Hi guys I am quite new to power BI and I am stuck with a report I would like to make. I have a list of IDs from production. We have in production 50 operations each with different number (e.g-20...
- 6 years ago
Hi Tommyvhod ,
Try these two measures to get the result in the picture. My table name is Fin.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
NathanielDate diff = VAR _Time = ( Fin[Finish date] ) //captures current date Var _maxLastTime = CALCULATE(MAX(Fin[Finish date]),FILTER(ALLEXCEPT(Fin,Fin[ID ]),Fin[Finish date]< _Time)) var _datedif =DATEDIFF(_maxLastTime,Fin[Finish date],day) return if(_datedif>0,_datedif,0) ================== Date Dif per ID = CALCULATE(DATEDIFF(MIN(Fin[Finish date]),MAX(Fin[Finish date]),DAY),Filter(ALLEXCEPT(fin,Fin[ID ]),Fin[ID ])
Tommyvhod
Helper II
6 years agoIt will need some fine tuning from the raw data point of view, but the formula works. Thank You
Nathaniel_C
Community Champion
6 years agoYou are welcome!