Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: requirement for sum

When we talk related base is june, You could try

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

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
Highlighted

Re: requirement for sum

When we talk related base is june, You could try

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

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

Highlighted
Specialist II
Specialist II

Re: requirement for sum

Check the attached app

Highlighted
Creator II
Creator II

Re: requirement for sum

Thanks Anil,

Can you please suggest how to achieve this in backend.

thanks

Highlighted
Specialist II
Specialist II

Re: requirement for sum

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;

Highlighted

Re: requirement for sum

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;

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)
Highlighted
Creator II
Creator II

Re: requirement for sum

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

Highlighted

Re: requirement for sum

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

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)