Forum Discussion
Relationship and Calculation between Tables with Time Series Data
- 7 years ago
Hi kolturra ,
You can create columns in 'Break Table' like DAX below.
Cost in Rupees =
var d1 = maxx(TOPN(1,FILTER('Cost details','Cost details'[Start D & T]<='Break Table'[Start D & T]),'Cost details'[Start D & T],DESC),'Cost details'[No Job Cost in Rupees])
var d2 = maxx(TOPN(1,FILTER('Cost details','Cost details'[Start D & T]<='Break Table'[Start D & T]),'Cost details'[Start D & T],DESC),'Cost details'[Cost in Rupees])
return
IF('Break Table'[Reason]="No job", IF(d1=BLANK(),d2,d1),d2)
Loss in Rupees = 'Break Table'[Break Time in Minutes]*'Break Table'[Cost in Rupees]
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi kolturra ,
You can create columns in 'Break Table' like DAX below.
Cost in Rupees =
var d1 = maxx(TOPN(1,FILTER('Cost details','Cost details'[Start D & T]<='Break Table'[Start D & T]),'Cost details'[Start D & T],DESC),'Cost details'[No Job Cost in Rupees])
var d2 = maxx(TOPN(1,FILTER('Cost details','Cost details'[Start D & T]<='Break Table'[Start D & T]),'Cost details'[Start D & T],DESC),'Cost details'[Cost in Rupees])
return
IF('Break Table'[Reason]="No job", IF(d1=BLANK(),d2,d1),d2)
Loss in Rupees = 'Break Table'[Break Time in Minutes]*'Break Table'[Cost in Rupees]
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.