cancel
Showing results for 
Search instead for 
Did you mean: 

Distinct count based on where condition in formaulas Crystal reports

former_member202170
Active Participant
0 Kudos

HI all

if (country= USA)

then distinct count(states)

when i am doing this formula it it returning all state irrespective  of the condition

Please advise

Thanks

Krishna M

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Krishna,

Create a formula with this code:

If {Country} = 'USA' then {State}

Go to 'Insert Summary' > Choose this formula field as the 'Field to summarize' > Choose 'Distinct Count' as the summary operation > Under Summary Location choose Group Footer or Report Footer depending on whether you need a subtotal or grand total.

-Abhilash

former_member202170
Active Participant
0 Kudos

Thanks abhilash

that really helped thank you very much ......

Answers (0)