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: 
kishorj1982
Creator II
Creator II

requirement for sum

hi all,

I have requirement as per below,

I have values from  Jun to december.

Value of jun is base

July values is= Value of June+ Value of July.

august values== Value of June+ Value of august.



september values= Value of June+ Value of september.


Can you please suggest how to achieve this.



Thanks



1 Solution

Accepted Solutions
Anil_Babu_Samineni

When we talk related base is june, You could try

Sum({<Month = {'Jun'}>}Sales)+Sum(Sales)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

7 Replies
Anil_Babu_Samineni

When we talk related base is june, You could try

Sum({<Month = {'Jun'}>}Sales)+Sum(Sales)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
techvarun
Specialist II
Specialist II

Check the attached app

kishorj1982
Creator II
Creator II
Author

Thanks Anil,

Can you please suggest how to achieve this in backend.

thanks

techvarun
Specialist II
Specialist II

Use below script if you want to achieve this in backend

TEST:

LOAD * INLINE [

    Month, Sales

    Jan, 10

    Feb, 20

    Mar, 30

    Apr, 40

    May, 50

    Jun, 60

    Jul, 70

    Aug, 80

    Sep, 90

    Oct, 100

    Nov, 110

    Dec, 120

];

Join Load Sales as BasePrice Resident TEST Where Month ='Jun';

Load*, If(Month = 'Jun',Sales,Sales+BasePrice) as FinalPrice Resident TEST;

DROP TABLE TEST;

Anil_Babu_Samineni

Perhaps this?

File:

Load Month,

         Sales

From Table;

Final:

NoConcatenate

Load Month, Sum(Sales) as Sales Resident File Where Match(Month, 'Jun') Group by Month Order By Month Desc;

Left Join (Final)

Load Month, Sum(Sales) as Sales Resident File Group By Month;

Drop Table File;

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
kishorj1982
Creator II
Creator II
Author

can u plz suggest how to achieve this by using if else condition in expression

Anil_Babu_Samineni

Are you playing in community?? Not sure, What requirement you have. I am sorry

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)