Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setanalysis to make field constant

Hi Experts,

Right now I am using below expression:

Sum(Trad_UNREALIZED_PL) + If(Trad_PERIOD='P0',0,RangeSum(Above(sum(Trad_UNREALIZED_PL) ,RowNo()-1)))

And my question is when ever I select ex:Period=P1  then P0 and P1 should be displayed so P0 should be displayed always without disturbing the results.

Could some one please help me?

Thank you


1 Solution

Accepted Solutions
avinashelite

Hi Raj,

After lot of R&D i found the soultion.

its dynamic use this expression:

if(GetSelectedCount(Product)=0,sum(AMOUNT),sum({<Product={'P0',"=Product=GetFieldSelections(Product)"}>}AMOUNT))

its working perfectly. Thanks for the innovative question it took almost 2 hrs

View solution in original post

19 Replies
avinashelite

as per my understanding the period selection show not affect the chart data?? if so try like this:

Sum(Trad_UNREALIZED_PL) + If(Trad_PERIOD='P0',0,RangeSum(Above(sum({<Trad_PERIOD=>}Trad_UNREALIZED_PL) ,RowNo()-1)))

Not applicable
Author

Hi Avinash,

Not that one. I will explain.

Added 2 attachments.

1 is current one.

2 is, which I am looking for.

Thank you.

avinashelite

try something like this:


Sum(Trad_UNREALIZED_PL) + If(Trad_PERIOD='P0',0,if(getfeildselction(Trad_PERIOD)='P1',angeSum(Above(sum({<Trad_PERIOD='P0,P1'>}Trad_UNREALIZED_PL) ,RowNo()-1)))



if not working please share your app

Not applicable
Author

Its a Huge application Avinash.

avinashelite

get the sample data raj, with that chart.

avinashelite

see the attached eg

Not applicable
Author

Hi Avinash,  Could you please paste the images, if you don't mind.  I don't have license to open other QVWs.   Thank you
avinashelite

Please see the attached image, according to your requirement I have a take some test data and tested the expression and its working fine.

If you got the answer please mark this thread as answered

Not applicable
Author

Hi Avinash,

Its perfectly alright but in my case I have P0 to P15 periods.

So Could you please suggest me in case?