Forum Discussion
COUNT DAX with Date Conditions
- Anonymous2 years ago
Thanks JamesFR06 for the quick reply!
Hi superhayan ,
(1) My test data is the same as yours.
(2) We can create measures.
Count_backlog = COUNTROWS(FILTER(ALLSELECTED('Compliance'),[Case Create Date]<=MAX('DateTable'[Date]) && [Current Status] <> "Closed"))Count_Closed = CALCULATE(COUNT(Compliance[Compliance Case ID]),FILTER(ALLSELECTED('Compliance'),'Compliance'[Case Close Date]=MAX('DateTable'[Date]) && 'Compliance'[Current Status]="Closed"))(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Hope this is what you want :
- superhayan2 years ago
Helper I
Thanks for your reply but sadly it gives a blank line chart. I pulled the formula to a Card visual and it showed "--". I am suspecting its because the x-axis (calendar) is related to Case Close Date and only cases that are "Closed" has a close date, so when we only count NON-Closed cases so it returns nothing?