Skip to Content

Percentage in Cross Tab Crystal Report

Hi All,

In my crosstab, I am trying to find a percentage of TRUE value per each month.

Please suggest how can I achieve this.

Thanks in advance!!

CROSSTAB

……………………………….JULY 17………………………AUGUST17

TRUE ………………………… ??? %..............................???%

REPORT

…….ID…….VALUE………Date

………1……..TRUE……….July17

……..2…….FALSE…………July17

…….3………TRUE………..July17

………4……..TRUE……August17

……..5………FALSE….August17

………6……..FALSE……August17

………7………FALSE……August17

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 25, 2017 at 09:15 AM

    Hi Alisia,

    Try this please:

    1. Insert a Group on the Date Field

    2. Create a formula called @perc with this code:

    Sum ({@val}, {Date Field}, "weekly") / Count ({@val}, {Date Field}) * 100

    Replace @val in the formula above with the name of the formula you created based on my initial reply. It would have this code:

    If{Table.Value}="TRUE" then 1

    3. Use @Perc in the 'Summarized Field' of the crosstab and set its summary function as 'Maximum' and uncheck 'Show Percentage' option if it's checked.

    4. Suppress the Group Header, details and Group Footer on the report.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 20, 2017 at 07:52 AM

    Hi Alisia,

    1. Create a formula with this code:

    If {Table.Value} = "TRUE" then 1

    2. Insert a Crosstab. Use the Month Field as the Column and the formula field above as the 'Summarized Field'.

    3. Highlight the Summary field > Change Summary > Under Options, select 'Show as a percentage of' > Beside "From" choose "Column".

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Abhilash,

      I've followed your instruction but I am getting 67% for July and 33% for August. I think this result based on denominator that includes only "TRUE" value.

      I need to get percentage based on denominator that includes total records of "TRUE"+"FALSE" for each month.

      The outcome that I'm looking for is

      CROSSTAB

      ……………………………….JULY 17………………………AUGUST17

      TRUE…… 2true/3july records(2true+1false) 67 % ..................1true/4august records(1true+3false)25%

      I hope this is possible.....

      Thank you very much!