Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Specialist
Partner - Specialist

Hi,

Try this in your Expression. Hope it helps you.

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

Regards,

kavita

View solution in original post

3 Replies
tresesco
MVP
MVP

May be simply a conditional expression like:

Count(Distinct MonthField)=1

Not applicable
Author

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
Partner - Specialist
Partner - Specialist

Hi,

Try this in your Expression. Hope it helps you.

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

Regards,

kavita