Forum Discussion

samadkhaan's avatar
samadkhaan
New Member
3 years ago
Solved

Count distinct dates against unique User name

Hi Im super new to the community. 

I am trying to calculate how many meetings my agents are conducting in a month - and not count multiple meetings they are doing. 

Eg. 

1) Shahid meets 5 people on 10th Oct and then he meets 8 more people on 22nd Oct, i want to count it as two active meeting days in month. 

 

Could you please help create a measure for this? 

 

S. No Date Agent Name 
117/09/2022Shahid Bhutto
217/09/2022Shahid Bhutto
317/09/2022Shahid Bhutto
417/09/2022Shahid Bhutto
517/09/2022Shahid Bhutto
617/09/2022Shahid Bhutto
727/09/2022Shahid Bhutto
827/09/2022Shahid Bhutto
927/09/2022Shahid Bhutto
1027/09/2022Shahid Bhutto
1110/10/2022Ali Gohar
1225/10/2022Mohammad Idrees
1319/10/2022Ali Gohar
1422/10/2022Barkat Ali
1515/10/2022Barkat Ali
1622/10/2022Barkat Ali
1727/10/2022Barkat Ali
1815/10/2022Barkat Ali
1922/10/2022Barkat Ali
2015/10/2022Barkat Ali

 

  • Supposing your table named Data, try to create a new table with the code below:

    Table =

    VAR _table =

    SUMMARIZE (

        Data,

        Data[Date],

        Data[Agent Name]

    )

    RETURN

    ADDCOLUMNS (

        _table,

        "Count",

       CALCULATE (COUNT(Data[S. No]))

    )

5 Replies

  • Supposing your table named Data, try to create a new table with the code below:

    Table =

    VAR _table =

    SUMMARIZE (

        Data,

        Data[Date],

        Data[Agent Name]

    )

    RETURN

    ADDCOLUMNS (

        _table,

        "Count",

       CALCULATE (COUNT(Data[S. No]))

    )

    • ankit3977's avatar
      ankit3977
      Frequent Visitor

      I am try same funcation but not getting result, When I am try to add same then I am getting error for multiplace  time coulumns cannot be conveted.

      My problem is 

      I have data when we have many member and those worked on many task on same on different date.  Now I want to count number of days by members So could please guide me how I can add measure to find out number of days work by members?  

       

       

       

    • samadkhaan's avatar
      samadkhaan
      New Member

      Hasnain, it is just counting all the dates. I want to count unique date agaisnt each Agent.