Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
kumarkp412
Creator II
Creator II

cumulative calculation

Hi friends ,

I have struck in creating the pivot table.

I want to calculate the  values in the expression as (subtotal - current cell ).

for example : I am having two dates (start date and end date) as dimension  and  one expression  sales as fact.

By creating the pivot table , i am using the start date and end date as dimension and in the expression as sales.

In the expression , i want to show the value as subtotal of the row  - current cell value for that i am using sum(total sales) - sum(sales).But it is given the value  as , total sales of the current sales.i am not able to find the solution

kindly grab some time to solve this.

Thanks in advance

Kumar

7 Replies
jyothish8807
Master II
Master II

Hi Parveen,

Over here the issue is because of start date and end date. Both are in dates but if Start date is Jan the End date may be Feb. Because of this the mismatch is happening.

So take only start date as dimension, and try.

Regards

KC

Best Regards,
KC
kumarkp412
Creator II
Creator II
Author

Hi jyothish,

Thanks for reply ,

But i want to show the two dates  in the dimension and take the value for that,

Thanks

Kumar

Not applicable

Hi,

  You can use the set analysis in expression.

jyothish8807
Master II
Master II

Hi Praveen

You can try something like this:

create a expression and give a label "new" then use this expression: amendment might require

sum(total <stdt>sales)-RangeSum(Alt(Before(new),0),Sum(sales))

RangeSum(Alt(Before(new),0),Sum(sales)) will give you the cumulative sum.

Hope it helps

Regards

KC

Best Regards,
KC
kumarkp412
Creator II
Creator II
Author

Hi Krishnama ,

In this how to use the set analysis ,.can you give me one example please

Thanks

Kumar

hariprasadqv
Creator III
Creator III

kumarkp412
Creator II
Creator II
Author

Hi Jyothish,

but it is giving the different value , what i  required.

thanks

Kumar