Forum Discussion
Anonymous
4 years agoNot applicable
undefined
Hello everyone, I am looking for guidance with below problem statement. I have data as below. My requirements is that on any calendar date, what is the status of the inspection. Consider, f...
- 4 years ago
Hi Anonymous ,
Try this:
Inspection Status = VAR CurrentDtae_ = MAX ( 'Calendar'[Date] ) VAR MaxInspectedDate_ = CALCULATE ( MAX ( 'Table'[Inspected Date] ), 'Table'[Inspected Date] <= CurrentDtae_ ) VAR MaxValidDate_ = IF ( MaxInspectedDate_ <> BLANK (), MaxInspectedDate_ + MAX ( 'Table'[Valid for] ) ) RETURN IF ( MaxInspectedDate_ <> BLANK (), IF ( CurrentDtae_ <= MaxValidDate_, "Inspected on time", "Overdue" ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
4 years agoCommunity Support
Hi Anonymous ,
Try this:
Inspection Status =
VAR CurrentDtae_ =
MAX ( 'Calendar'[Date] )
VAR MaxInspectedDate_ =
CALCULATE (
MAX ( 'Table'[Inspected Date] ),
'Table'[Inspected Date] <= CurrentDtae_
)
VAR MaxValidDate_ =
IF (
MaxInspectedDate_ <> BLANK (),
MaxInspectedDate_ + MAX ( 'Table'[Valid for] )
)
RETURN
IF (
MaxInspectedDate_ <> BLANK (),
IF ( CurrentDtae_ <= MaxValidDate_, "Inspected on time", "Overdue" )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable