Forum Discussion
yasbos
Resolver II
8 months agoDate 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...
- 8 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 )
pcoley
Super User
8 months agoPlease try whit COUNTROWS DISTINCTCOUNT(account) instead of DISTINCTCOUNT(account[Account Number])
I hope this helps. if so please mark it as a solution. Kudos are welcome.
yasbos
Resolver II
8 months agoThanks so much. I tried (below), but I unfortunately still got the same wrong number (322) instead of 328.
Traded Accts D7 =
CALCULATE(
COUNTROWS(account),
USERELATIONSHIP(_date[Date], account[Date Opened]),
FILTER(
account,
NOT ISBLANK(account[First Trade Date]) &&
account[First Trade Date] <= account[Date Opened] + 7
)
)
- cengizhanarslan8 months ago
Super User
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 )