"sequence"
2 TopicsCalculate a date sequence on a row level per ID (in DAX)
Hi there, I have this data set where each patient goes through different treatments (each row is a new treatment). I would like to add a new column (using DAX) that creates a sequence of numbers from 1 to "N" for each Patient, being 1 assigned to the earliest date. This is what the new column should look like: Patient Created on (d/mm/yyyy) Treatment number (calculated column) Patient A 16/08/2023 3 Patient A 5/05/2023 2 Patient A 25/03/2023 1 Patient B 13/08/2023 2 Patient B 5/05/2023 1 Patient C 19/06/2023 1 Patient D 8/09/2023 2 Patient D 14/07/2023 1 Thanks!Solved635Views0likes2Commentscalculate downtime
I am looking for help. I would like to calculate the downtime of a machine in a column of a table for this I need the difference in minutes between the start time and stop time. The only exception is that the machine produces on working days from Monday to Friday from 6am to 11pm. so if the machine breaks down on Friday 10:50 PM and the fault is resolved on Monday 6:10 AM, 20 minutes of downtime must be calculated. I have tried everything but I cannot find the right combination of formulas. does anyone know if this is possible? example: Start: 9/1/2023 6:00:00 PM Stop: 9/1/2023 8:13:00 PM Result: 133 Start: 9/1/2023 9:15:00 PM Stop: 9/2/2023 8:13:00 PM Result: 105 Start: 9/3/2023 9:00:00 AM Stop: 9/3/2023 8:30:00 PM Result: 0 Start: 9/1/2023 10:15:00 PM Stop: 9/4/2023 8:00:00 AM Result: 1655.1KViews0likes2Comments