cancel
Showing results for 
Search instead for 
Did you mean: 

Percentage in Cross Tab Crystal Report

Former Member
0 Kudos
1,033

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thank you very much Abhilash! You are the best!

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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!