Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Calculate expression if single field selected

Hello,

I am creating a table where I would like a column to show a Monthly calculation if a single month is selected. If no month or multiple months are selected, this column should show nulls.

Can anyone help with syntax for something like this? I'm presuming I would add it to the 'Conditional' box for expressions?

Thanks very much.

Mel

1 Solution

Accepted Solutions
kavita25
Valued Contributor

Re: Calculate expression if single field selected

Hi,

Try this in your Expression. Hope it helps you.

=if(GetSelectedCount(MonthField)=1,sum(Value), '-')

Regards,

kavita

3 Replies
MVP
MVP

Re: Calculate expression if single field selected

May be simply a conditional expression like:

Count(Distinct MonthField)=1

Not applicable

Re: Calculate expression if single field selected

Hi,

Yes, you are right.

You can write the general expression for calculation and then Force the Chart to be displayed on the selection of a Distinct Month Value as tresesco has suggested i.e.

Count(Distinct MonthField)=1

Cheers !

kavita25
Valued Contributor

Re: Calculate expression if single field selected

Hi,

Try this in your Expression. Hope it helps you.

=if(GetSelectedCount(MonthField)=1,sum(Value), '-')

Regards,

kavita

Community Browser