Forum Discussion

yasbos's avatar
yasbos
Icon for Resolver II rankResolver II
6 months ago
Solved

Date relationship issues

Hi. I have this weird issue with dates. I have an accounts table that is related to the Account[Date Opened] *-->1  _date[Date] field in the _date table. The relationship is inactive. However, I acti...
  • cengizhanarslan's avatar
    cengizhanarslan
    6 months ago

    Could you please try this: 

    Traded Accts D7 =
    CALCULATE(
        DISTINCTCOUNT(account[Account Number]),
        USERELATIONSHIP(_date[Date], account[Date Opened]),
        CROSSFILTER(account[Account Number], Assets[Account Number], NONE),
        FILTER(
            account,
            NOT ISBLANK(account[First Trade Date]) &&
            account[First Trade Date] <= account[Date Opened] + 7
        )