Forum Discussion

saud968's avatar
saud968
Memorable Member
5 years ago

Getting the count by Date

Need to get the count for the Current week for August and then count since the oldest date

 

For example, if in August first week has 5 count billing and then the total count should be the oldest date. So current 5 + count from old is 5 so total 10. AllisonKennedy  ChrisMendoza amitchandak  @Greg_Deckler @Jihwan_Kim 

Please help me out

 

I tried this but it is not giving the correct count 

Open Credit = CALCULATE(COUNT(Credit[Billing Request: Created Date]) + COUNT('Calendar'[Year]))
 
So instead of 95 as shown below in excel, it is only giving 42

 

Below is how it looks on excel 

 

 

Billing Request: Created Date
10/26/2020
10/26/2020
10/26/2020
10/26/2020
10/26/2020
10/26/2020
10/26/2020
10/26/2020
10/26/2020
10/27/2020
10/28/2020
10/28/2020
10/28/2020
10/28/2020
10/28/2020
10/28/2020
10/28/2020
10/29/2020
10/29/2020
10/29/2020
10/29/2020
10/29/2020
10/29/2020
10/29/2020
10/29/2020
10/30/2020
10/30/2020
10/30/2020
10/30/2020
10/30/2020
10/30/2020
10/30/2020
10/30/2020
08/01/2021
08/02/2021
08/02/2021
08/02/2021
08/02/2021
08/03/2021
08/03/2021
08/04/2021
08/04/2021
08/05/2021
08/05/2021
08/05/2021
08/05/2021
08/05/2021
08/05/2021

8 Replies

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Community Support

    Hi saud968

     

    Not clear about your expected output.

    Do you want the count from the earliest date to before the current week?

    If you still have some question, please don't hesitate to let me known.‌‌

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

     

    • saud968's avatar
      saud968
      Memorable Member

      v-xulin-mstf Yes, you are partially right. Basically, I need the count from the earliest date including the current week

      • v-xulin-mstf's avatar
        v-xulin-mstf
        Community Support

        Hi saud968,

         

        Try measure as:

        Measure = 
        CALCULATE(Credit[Billing Request: Created Date])+CALCULATE(COUNT('Calendar'[Date]),FILTER('Calendar',WEEKNUM('Calendar'[Date])=WEEKNUM(TODAY())))

        If you still have some question, please don't hesitate to let me known.‌‌

         

        Best Regards,

        Link

         

        Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!