Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Apply a filter to remove a specific date for DST

Hi, I have a table that shows days divided into 30 min segments, with a production total for each period and when there is a Daylight Saving day, there will be 50 or 46 segments, not 48. I need to b...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    According to the table you provided, I first created a date column.

    Date = Date(Left([DATE YYYYMMDD],4),Right(left([DATE YYYYMMDD],6),2),right([DATE YYYYMMDD],2))

     

    Then create two measures. The first meaesure is to calculates the sum of the output grouped by date.

    Sum = CALCULATE(SUM('Table'[OUTPUT]),FILTER(ALLSELECTED('Table'),[DATE YYYYMMDD]=MAX('Table'[DATE YYYYMMDD])))
    the best production day = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Sum]= MAXX(ALL('Table'),[Sum])))

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.