Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Gauge chart not displaying count with conditional expression

Hi

I am new to QlikView and I am trying to display some gauge charts which display different aspects of a campaign.

Gauge chart 1 - Displays number of payees

Expression: =if([Campaign Type]='Paid', Count (DISTINCT [Member ID]), 0)

This is displaying the correct numbers for campaigns.

Gauge chart 1 - Displays number of complimentary places

Expression: =if([Campaign Type]='Complimentary', Count (DISTINCT [Member ID]), 0)

This continues to display 0 despite there being records with 'Complimentary' as a value. Any ideas as to what I'm doing wrong?

Thanks in advance for any help...

1 Solution

Accepted Solutions
Not applicable
Author

You ask QlikView "if the dimension [Campaign Type] equals 'Paid' (aka the selection I've made on the [Campaign Type] field), then do me the count for all possible values".

I think you want to ask "do me the count for items where [Campaign Type] equals 'Paid'".

Try

=Count (DISTINCT if([Campaign Type]='Paid', [Member ID]))

and

=Count (DISTINCT if([Campaign Type]='Complimentary', [Member ID]))

and don't do any selection.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Can you please provide some sample data..

Not applicable
Author

You ask QlikView "if the dimension [Campaign Type] equals 'Paid' (aka the selection I've made on the [Campaign Type] field), then do me the count for all possible values".

I think you want to ask "do me the count for items where [Campaign Type] equals 'Paid'".

Try

=Count (DISTINCT if([Campaign Type]='Paid', [Member ID]))

and

=Count (DISTINCT if([Campaign Type]='Complimentary', [Member ID]))

and don't do any selection.

Not applicable
Author

Legend! Thanks, Nicolas.