get sum of max values

  • I have a table with dates

    date Sends Opens Clicks Bounces

    9/1/2016 1 2 45

    9/1/2016 1 2 45

    9/16/2016 0 10 235

    9/16/2016 0 10 235

    9/16/2016 0 10 235

    9/16/2016 0 10 235

    I am grouping on date and getting data something like below

    date Sends Opens Clicks Bounces

    9/1/2016 1 2 45

    9/16/2016 0 10 235

    sends ,opens , clicks bounces columns has expression to get max value.: MAx(Fields!.sends.value)

    Now i want to calculate the total of all max values for all dates

    date Sends Opens Clicks Bounces

    9/1/2016 1 2 45

    9/16/2016 0 10 235

    TOTAl: 1 12 27 10

    How can we do this? I tried sum(max(Fields!.clciks.value)) it is justting the max value from the clicks and giving me 23

    whne i need 27

  • komal145 (9/30/2016)


    I have a table with dates

    date Sends Opens Clicks Bounces

    9/1/2016 1 2 45

    9/1/2016 1 2 45

    9/16/2016 0 10 235

    9/16/2016 0 10 235

    9/16/2016 0 10 235

    9/16/2016 0 10 235

    I am grouping on date and getting data something like below

    date Sends Opens Clicks Bounces

    9/1/2016 1 2 45

    9/16/2016 0 10 235

    sends ,opens , clicks bounces columns has expression to get max value.: MAx(Fields!.sends.value)

    Now i want to calculate the total of all max values for all dates

    date Sends Opens Clicks Bounces

    9/1/2016 1 2 45

    9/16/2016 0 10 235

    TOTAl: 1 12 27 10

    How can we do this? I tried sum(max(Fields!.clciks.value)) it is justting the max value from the clicks and giving me 23

    whne i need 27

    Quick suggestion, wrap the first calculation in a CTE and then do the sum, don't try to do both in the same query segment.

    😎

  • this has to be done by grouping and expression in ssrs . So , cannot use CTE.

    Anyways i did resolve this by grouping.

  • this has to be done by grouping and expression in ssrs . So , cannot use CTE.

    I am curious about this requirement. Would you mind sharing why?

    ----------------------------------------------------

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply