Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73706

Report "Count distinct" aggregation incorrect for column with multiple fields

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0
    • 4.0
    • Report builder
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide
      1. Log in as admin
      2. Create three new users
        • Lionel Smith
        • Lionel Jones
        • Lionel Smith
      3. Navigate to Reports > Report builder > Custom reports in site administration
      4. Create a new report from the Users report source
        • Ensure Include default setup is unchecked
      5. In the report editor, add the Users > Full name column
      6. Open Conditions
      7. Add User > First name condition for Is equal to: Lionel (for convenience)
      8. Set Full name column aggregation to Comma separated values
      9. Confirm report row shows the following:

        Lionel Jones, Lionel Smith, Lionel Smith
        

      10. Set Full name column aggregation to Comma separated distinct values
      11. Confirm report row shows the following:

        Lionel Jones, Lionel Smith
        

      12. Set Full name column aggregation to Count
      13. Confirm report row shows the following:

        3
        

      14. Set Full name column aggregation to Count distinct
      15. Confirm report row shows the following:

        2
        

      Show
      Log in as admin Create three new users Lionel Smith Lionel Jones Lionel Smith Navigate to Reports > Report builder > Custom reports in site administration Create a new report from the Users report source Ensure Include default setup is unchecked In the report editor, add the Users > Full name column Open Conditions Add User > First name condition for Is equal to: Lionel (for convenience) Set Full name column aggregation to Comma separated values Confirm report row shows the following: Lionel Jones, Lionel Smith, Lionel Smith Set Full name column aggregation to Comma separated distinct values Confirm report row shows the following: Lionel Jones, Lionel Smith Set Full name column aggregation to Count Confirm report row shows the following: 3 Set Full name column aggregation to Count distinct Confirm report row shows the following: 2

      Assume you have two users with the following names:

      1. User One
      2. User Two

      & you create a report containing the User > Fullname column, aggregated by Count distinct

      You should receive the value 2, because there are two distinct fullnames

      What you receive is the value 1, because the aggregation type only considers the first column field (in this case the user firstname) and there is only one distinct firstname

        1. image-2022-01-31-17-29-05-341.png
          10 kB
          Amaia Anabitarte
        2. image-2022-01-31-17-29-56-985.png
          10 kB
          Amaia Anabitarte
        3. image-2022-01-31-17-30-43-198.png
          5 kB
          Amaia Anabitarte
        4. image-2022-01-31-17-31-16-448.png
          6 kB
          Amaia Anabitarte

            pholden Paul Holden
            pholden Paul Holden
            David Carrillo David Carrillo
            Ilya Tregubov Ilya Tregubov
            Amaia Anabitarte Amaia Anabitarte
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 40 minutes
                1h 40m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.