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

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


19 Replies
avinashelite

means?? for each selection you want different periods to be shown??

can you please explain me what your looking for

Not applicable
Author


For Ex:

If I select P1 then

P0

P1

and If I select P2 then

P0

P2

and If I select P3 then

P0

P3

Like this.

Thanks Avinash for helping me.

Not applicable
Author

Hi Raj,

Please create a new field PeriodNo to stored numeric representation of the period column..

eg  P1 = 1,P2 = 2 ......

and then used the set expression like

sum({<PeriodNo={'<=$(=Max(PeriodNo))'},Period=>}yourcolumn) for Sum of Each Row

and

sum({<PeriodNo={'<=$(=Max(PeriodNo))'},Period=>}B) + RangeSum( Above(sum({<PeriodNo={'<=$(=Max(PeriodNo))'},Period=>}B)))
for cumulative sum.

Regards

Nandkishor

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

avinashelite

Hey if you got the answer please mark it as answered

Not applicable
Author

Hi Avinash,

Let me test it.

Thanks for your help.

avinashelite

sure Raj, if you have any issue let me know

avinashelite

Hi Raj,

Did this issue got resolved??? or still any issues

Not applicable
Author

Sorry Avinash, I couldn't get time to check this as I was stuck on other issues and even you helped me on those also.

I knew that you have spent much time on this issue, I can't forget it. I am sure that I will check this.

avinashelite

sure bro