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: 
beck_bakytbek
Master
Master

cumulul value in depence on moths

Hi Folks,

i got a situation, where my data do look like:

Month, Sales

1, 5

2, 3

3, 2

 

on the base of field: Sales i created the cumulative values by using of this expression:

RangeSum(Above(Sum(Sales),0, RowNO())) and my data do look like:

Month, CumulValue

1, 5

2, 8

3, 10

when i am building the bar-diagramm with Month as Dimension and CumulValue as Expression and if i select the month 3 so i see only the Value: 2, my expected value is: if i select only one or last dimension like: Month = 3, i want see only the cumul value = 10.

Does anybody have any idea how to resolve this issue (by using of set expression)?

Thanks a lot

Beck

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this?

if(Year=previous(Year), rangesum(Value, peek(CumulativeSales)),Value) as CumulativeSales 

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

5 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

The values will not change if u use it in the backend but if u use it in front end the values depend on previous value so the value will get changed and retains its old value.

Try using this expression in the backend

RangeSum(peek(CumulaiveSales) , Sales) as CumulaiveSales

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
beck_bakytbek
Master
Master
Author

Hi Kashyap,

 

thanks a lot for your responce, i will implement it and will let you know, if i get a success

beck_bakytbek
Master
Master
Author

Hi Kashyap,

your expression does work well, i want ask you, can i use your expression:

RangeSum(peek(CumulaiveSales) , Sales) as CumulaiveSales 

to show the cumulative Value for each Year, i show you an example:

Year,     Month,        Value

2019           1                5

2019           2                2

2019           3                3

2020           5               10

2020           6                2

2020           7                5

 

my expected output is:

Year,     Month,        Value   KumulValue

2019           1                5               5

2019           2                2               7

2019           3                3              10

2020           5               10             10

2020           6                2               12

2020           7                5               17

and if i select the year = 2020 i want to see only the cumulative value for month and year  of 2020

Do you any idea how to resolve this issue?

Thanks  a lot

Anil_Babu_Samineni

Perhaps this?

if(Year=previous(Year), rangesum(Value, peek(CumulativeSales)),Value) as CumulativeSales 

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)
beck_bakytbek
Master
Master
Author

Anil_Babu

thanks a lot for your time and help