Combine DISTINCTCOUNT and FILTER function

CES 1 Reputation point
2020-07-01T15:00:41.46+00:00

Hello, I am trying to return the number of trading days in 2020 from a data set that also includes data from 2019. The formula that I'm currently using is:

DISTINCTCOUNT(Commissions Master[Trade Day].[Date]),
FILTER(Commissions Master[Year]=2020))

The data in the table is also organized by client, and the formula above appears to automatically group Trade Day by client instead of providing the aggregate of all trade days (ie. a client executed a trade on only 5 of the past 125 trading days) when my goal is to calculate the total trade days in the year to date.

Is there a way I can use a MAX function or something similar to return the highest value for all clients instead of just applying the total trade count by client?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,678 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-07-01T15:04:16.91+00:00

    Transact SQL is not currently supported here on QnA. They're actively answering questions in dedicated forums here.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql

    --please don't forget to Accept as answer if the reply is helpful--


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.