Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

bharatkishore
Contributor III

Expression in Straight Table

Hi All,

I have 10 fields in a list box by writing an load * inline statement. I have written the below expression in the straight table chart

=sum(IB_1)

Now my problem is,this expression should be changed whenever i select a field(Flag) the expression should be changed to sum(IB).

If i un-select flag then it should be changed to sum(IB_1).

Attached qvw for reference.

Is it possible to achieve.

Thanks,

Bharat

1 Solution

Accepted Solutions

Re: Expression in Straight Table

May be this

=If(SubStringCount('|' & Concat(distinct Dimension2, '|') & '|', '|Flag|'), Sum(IB), Sum(IB_1))

View solution in original post

5 Replies

Re: Expression in Straight Table

May be this

=If(SubStringCount('|' & Concat(distinct Dimension2, '|') & '|', '|Flag|'), Sum(IB), Sum(IB_1))

View solution in original post

mayankraoka
Valued Contributor

Re: Expression in Straight Table

Hi Bharat,

If I understand your requirement correctly here is the solution.

Please find attached qvw

Regards,

Mayank !

bharatkishore
Contributor III

Re: Expression in Straight Table

Thanks Sunny....You are just Awesome...

One more thing after writing this expression based on the month selection the value should effect.

For example: if i select jan the value should be (expression)/1 , if  i select feb (expression)/2 , if i select march (expression)/3  if i april (expression)/4.. Can you please tell me how to achieve this..

Re: Expression in Straight Table

May be this

=If(SubStringCount('|' & Concat(distinct Dimension2, '|') & '|', '|Flag|'), Sum(IB), Sum(IB_1))/Month(Period_NR)

bharatkishore
Contributor III

Re: Expression in Straight Table

Thanks Genius.. Sorry Missed the trick..