Forum Discussion
Dax DisctinctCount with date condition
- Anonymous7 years ago
i've tryed both the solutions you guys gave, sadly idk why it didnt work so what i did to make it work is to create a columm in the Sales Tables called "Register Date" with this fucntion
RegisterDate= Related('MembershipTable'[Registerdate]
with this and the a mix of the measure i used at the beginning and parts of yours it worked
Tickets = CALCULATE(DISTINCTCOUNT('SalesTable'[DOC Number]),FILTER('SalesTable','MembershipTable'[RegisterDate]<='SalesTable'[SalesDate]))Thanks a lot for your solutions 3 minds think better than 1 :)
Hello Anonymous
Is it because you used >= instead of just > in your measure? When I test it the logic works if I use < and swap the order.
Hi, thanks for the answer! but my problem persist i forgot to mention that "Register Date" is in another table i have like a sales table and a membership table
- jdbuchanan717 years agoSuper User
Anonymous
Can you share a sample .pbix with the tables and relationships? It helps a lot to know how the data is set up.