Forum Discussion

moei's avatar
moei
Frequent Visitor
5 years ago
Solved

Counting rows/entries pr date not working.. why?

This is my data set (about 100000rows) I want to count how many files are created each day.  

 

I havde created a Calender (Kalender = CALENDAR(MIN('Query'[CreatedDate]),MAX('Query'[CreatedDate])))

and set up the following relation. Date -> CreatedDate (1:*)

My measure for counting is Count = DISTINCTCOUNT('Query'[CourseElementId])

The result is not exactly impressive… 🙂 im obviously not doing it right. But what am I not getting?

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi moei,

    Perhaps you can try to use the following measure formula if it works on your side:

     

    Count =
    CALCULATE (
        COUNTROWS ( VALUES ( 'Query'[CourseElementId] ) ),
        VALUES ( Calendar[Date] )
    )

     

    If the above not help, can you please share some dummy data to test?

    How to Get Your Question Answered Quickly
    Regards,

    Xiaoxin Sheng

5 Replies

  • "My measure "  - you either need to use a calcuated column, or change your measure formula.

  • Hi,

    I cannot spot the mistake in what ou have done.  Share the link from where i can download your PBI file.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi moei,

    Perhaps you can try to use the following measure formula if it works on your side:

     

    Count =
    CALCULATE (
        COUNTROWS ( VALUES ( 'Query'[CourseElementId] ) ),
        VALUES ( Calendar[Date] )
    )

     

    If the above not help, can you please share some dummy data to test?

    How to Get Your Question Answered Quickly
    Regards,

    Xiaoxin Sheng

    • moei's avatar
      moei
      Frequent Visitor

      Thank you very much for your suggestion. I will try this asap.

    • moei's avatar
      moei
      Frequent Visitor

      You solution worked! Thank you very much 😄