How is summary option "skip_single_line_summary" working?

(7 posts) (2 voices)

Tags:

No tags yet.

  1. nkahn, Member

    Hello,

    I am trying to figure out how that summary option is working but despite all my tests I still don't get it.

    When using that option, it always removes all intermediate summary lines without taking into account the fact that summary level has only one row or not.

    Here is an example where I'd like to remove summary line in case only one row exists for an action (header of 2nd level):

    SELECT 'dbr.hdr', 1; -- Partner is first header
    SELECT 'dbr.hdr', 2; -- Action is second header
    SELECT 'dbr.sum', 4,5,6,7,8,9;
    SELECT 'dbr.summary.options', 'skip_single_line_summary';
    SELECT 'dbr.summarytxt', 1, 'TOTAL';
    SELECT
    Partner,
    Action,
    Origin,
    SUM(TotTransPrev) AS '#Trans N-1',
    SUM(TotTrans) AS '#Trans N',
    SUM(TotTrans-TotTransPrev) AS 'Delta Trans',
    SUM(TotPtsPrev) AS '#Pts N-1',
    SUM(TotPts) AS '#Pts N',
    SUM(TotPts-TotPtsPrev) AS 'Delta Pts'
    FROM Test
    GROUP BY Partner ASC, Action ASC, Origin ASC
    ;

    Thanks for your help.
    Regards,

    -Nicolas

  2. myDBR Team, Key Master

    Yes,
    it's broken in the current release. Sorry about that.

    It's already been fixed, just waiting for the next release to come along.

    --
    myDBR Team

  3. nkahn, Member

    Thanks for the quick reply.
    Do you already know when next version should be released (roughly speaking)?

    -Nicolas

  4. myDBR Team, Key Master

    No dates yet.

    --
    myDBR Team

  5. nkahn, Member

    Hello,

    I am reposting on this topic since I still have issues with "skip_single_line_summary" option despite of the fix deployed lastly.

    Summary line are skipped correctly but the result of the summary calculation does not seem to be done correctly in some cases.
    Indeed, if the summary line was skipped in previous level, data does not seem to be reset correctly regarding the sum of selected columns and next summary line will also take into taken current and previous levels.

    Since it's hard to describe that problem with words, here is SQL code used to reproduce the error I encountered.
    My problem is the result displayed for summary line of header "Header 2" and sub-header "Sub-Header 2.2". Sums are not limited to lines with these specific header and sub-header but it also takes previous sub-header ("Sub-Header 2.1") into account.


    SELECT 'dbr.hdr', 1; /* First column is first header level */
    SELECT 'dbr.hdr', 2; /* Second column is second header level */
    SELECT 'dbr.sum',4,5;
    SELECT 'dbr.summary.options', 'skip_single_line_summary';
    SELECT 'dbr.summarytxt', 1, 'TOTAL'; SELECT 'Header 1' AS Header, 'Sub-Header 1.1' AS SubHeader, 'Type 1' AS Type, 2 AS I1, 20 AS I2
    UNION
    SELECT 'Header 1' AS Header, 'Sub-Header 1.1' AS SubHeader, 'Type 2' AS Type, 3 AS I1, 30 AS I2
    UNION
    SELECT 'Header 2' AS Header, 'Sub-Header 2.1' AS SubHeader, 'Type 2' AS Type, 5 AS I1, 50 AS I2
    UNION
    SELECT 'Header 2' AS Header, 'Sub-Header 2.2' AS SubHeader, 'Type 1' AS Type, 6 AS I1, 60 AS I2
    UNION
    SELECT 'Header 2' AS Header, 'Sub-Header 2.2' AS SubHeader, 'Type 2' AS Type, 1 AS I1, 10 AS I2
    ;

    Could you check if there is a problem or if I am not using that option in a correct way?

    Thanks for your help.
    Regards,

    -Nicolas

  6. myDBR Team, Key Master

    Looks like It is still giving us trouble with multiple header levels.

    We'll take a look at it. Thanks for pointing this out.

    --
    myDBR Team

  7. myDBR Team, Key Master

    Summary calculation should now work correctly. Run the update to get the lastest build.

    --
    myDBR Team


Reply

You must log in to post.