Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
2 years ago
Solved

calendar date 01-01-1900

i am using calendar(min(order_date),max(order_date)) for date table which is generating large table due to presence of order_ date column vaue '01-01-1900'. how to ignore this value in date table?
  • Joe_Barry's avatar
    2 years ago

    Hi powerbiexpert22 

     

    Please try this

    Date = 
        VAR MinDate = CALCULATE(MIN(Table[OrderDate]), Table[OrderDate] <> DATE(1900, 1, 1))
        VAR MaxDate = CALCULATE(MAX(Table[OrderDate]), Table[OrderDate] <> DATE(1900, 1, 1))
        RETURN
            CALENDAR(MinDate, MaxDate)


    Hope this helps

    Joe