Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Finding the Date Range

Hi community, I need help on how to complete my task. I was a given a dataset where it displays the job start date and end date for each staff. However, the data does not consist of the dates in whic...
  • ryan_mayu's avatar
    3 years ago

    Anonymous 

    maybe you can try this to create two columns

    Column = 
    VAR _next=minx(FILTER('Table','Table'[Name]=EARLIER('Table'[Name])&&'Table'[Start]>EARLIER('Table'[Start])),'Table'[Start])
    return if(_next<='Table'[End],blank(),'Table'[End]+1)
    
    Column 2 = 
    VAR _next=minx(FILTER('Table','Table'[Name]=EARLIER('Table'[Name])&&'Table'[Start]>EARLIER('Table'[Start])),'Table'[Start])
    return if(ISBLANK('Table'[Column]),BLANK(),_next-1)

    pls see the attachment below