Forum Discussion

LeeI's avatar
LeeI
Frequent Visitor
2 years ago
Solved

question about using PreviousDay function

I have a simple measure that is supposed to return the previous days number for a count of apps that meet a certain criteria. At first, I tried this dax expression:    Apps previous day = Calculate...
  • bhanu_gautam's avatar
    2 years ago

    LeeI  , The PREVIOUSDAY function is a time intelligence function that works with a date column to return a table containing the previous day. However, it requires a proper date context to function correctly.

     

    Try using ALL function to remove any existing filter on dim[date]

     

    Apps previous day =
    CALCULATE(
    COUNT(data[app Number]),
    PREVIOUSDAY(ALL('Date DIM'[Date]))
    )