Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Matching dates to a holiday table

I have a column that contains dates that cases were opened - 'Cases'[CreatedDate] with a date/time format of 12/26/2016 5:56:17 PM   In a second table I have all corporate holidays listed - 'Holida...
  • v-juanli-msft's avatar
    8 years ago

    Hi Anonymous

    “I built a relationship between the values and was able to get a column to show the date”

    Do you mean “built a relationship between the values” instead of building a relationship on the date column?

    Does the following example do as you said?

    Then with a DAX, I can lookup “Holiday” based on “value” as follows.

    Next, identify matching dates and produce a result of "True"

    Column = LOOKUPVALUE(Holidays[Holidays],'Cases'[CreatedDate],[CreatedDate])
    flag = IF([Column]=[CreatedDate],"true",BLANK())

    Best Regards

    Maggie