Forum Discussion

Applicable88's avatar
Applicable88
Icon for Impactful Individual rankImpactful Individual
5 years ago
Solved

Datediff and row context

Hello,    I have question regarding the datediff() function. In the syntax it is not mentioned that its a iterator. But why it works in a measure like this: Ampel = VAR _dur = DATEDIFF ( MAX...
  • parry2k's avatar
    5 years ago

    Applicable88 not sure if I fully understood your question. MAX date will not necessarily return the MAX date in your calendar table it will return in the row filter context.

     

    If you are looking at the data at the month level, the max date will of that month, the same data you are looking at by week, the max date will be the max of that week, and so forth so on.

     

    It is always good to provide some sample data and how you are visualizing to provide more context to the problem. MAX date doesn't mean anything until you define in what context you are looking at it.