Forum Discussion
PhotoBiker
Advocate I
8 years agoDISTINCTCOUNT with filters
Hi, I'm trying to get a DISTINCTCOUNT after I filtered a table. In the table below, I'm only interested in the records where Answer = Yes. Then, I want to count the distinct clients. ...
- Anonymous8 years ago
Hey PhotoBiker,
I tried your code and it worked for me. I got a "Clients who Answered Yes" of 1 for all of the specific filters, and 2 if no filters were selected. Did you create a measure or a calculated column? A measure should produce the proper output while a calculated column would behave the way you are describing.
Thanks,
Parker
gkeune
6 years agoFrequent Visitor
I use just measures and is still doent work.
New count = CALCULATE(DISTINCTCOUNT(Sheet1[name]), FILTER('Calendar', [new] = "new"))
new = IF( [Last 365 days1]-[Last 90 days1]= 0,"New")
Last 90 days1 = CALCULATE(SUM(Sheet1[amount ]),DATESBETWEEN(Sheet1[date],MAX([Date])-90,MAX([Date])))
Last 365 days1 = CALCULATE(SUM(Sheet1[amount ]),DATESBETWEEN(Sheet1[date],MAX([Date])-365,MAX([Date])))
I also combined all in one new statement it still doent work. Hope u can help.