Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Perhaps this?

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

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
Partner
Partner

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

Highlighted
Master
Master

Hi Kashyap,

 

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

Highlighted
Master
Master

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

Highlighted

Perhaps this?

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

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

Anil_Babu

thanks a lot for your time and help