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.
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-50-70-80 ...) after finishing a part on each operation a finish date is added for the given operation. Additional thing is that the order of these operations are not alwazs the same but the IDnumber of the operation is always ascending ( 20-30-50-80 or 20-30-70-80 or 20-70-90 .... )
What I would like to make is: for all the IDs know the days between each operation ( and of course the whole production time for one ID) in days.
E.g:
ID | Operation ID | Finish date |
48097 | 10 | 1. 10. 2019 |
48097 | 35 | 3. 10. 2019 |
48097 | 50 | 4. 10. 2019 |
48097 | 70 | 4. 10. 2019 |
48097 | 80 | 7. 10. 2019 |
48097 | 90 | 9. 10. 2019 |
48097 | 110 | 11. 10. 2019 |
48097 | 165 | 11. 10. 2019 |
48097 | 210 | 13. 10. 2019 |
48104 | 30 | 1. 10. 2019 |
48104 | 35 | 1. 10. 2019 |
48104 | 50 | 2. 10. 2019 |
48104 | 70 | 5. 10. 2019 |
48104 | 110 | 8. 10. 2019 |
48104 | 135 | 11. 10. 2019 |
48104 | 180 | 13. 10. 2019 |
48104 | 190 | 15. 10. 2019. |
Thank You very much
Solved! Go to Solution.
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.
Nathaniel
Date 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 ])
Proud to be a Super User!
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 |
---|---|
41 | |
19 | |
19 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |