Forum Discussion

OrbitJO's avatar
OrbitJO
Frequent Visitor
3 years ago

S-Curve with Date & Time

Hi Ninjas!!

 

I am trying to generate S-curve with Date & Time Interactions. I've got separate Date and Time tables and the relationships are something like this..

Connections - Date from the Calender table with BL Date & TIME[Time] with BL Time in the BL Table. Shift refers to 2AM to 2PM.

Problem 1 - is that the Baseline hours are not divided for each time unit. The result comes out as 255 for Each shift on 12 July where as total budget allocation for 12 Jul is 255. Total budget is 5.8k and the sum of bar chart is showing as 5.8k times 2 = 11600.

Problem 2 - Running total is not taking shift or time element into accoung as I have used following DAX for Running total..

 

Cumulative BL Units =
CALCULATE(
    SUM('BL SCURVE'[LABORUNITSPERDAY]),
    FILTER(
        ALLSELECTED('CALENDAR CALC'[Date]),
        ISONORAFTER('CALENDAR CALC'[Date], MAX('CALENDAR CALC'[Date]), DESC)
    )
)
 
Which I think is not correct as CALENDAR CALC'[Date] does not have time element to it. How do I fix this to consider time element and to consider Running Total for Each shift?
 
EDIT: PowerBI File 
Source Data
 
Expected Result:

 

 
 
 
Thanks in advance!

2 Replies