Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Rocky6
Creator
Creator

Adding up column value

Hi Everyone ,

I have a requirement were I need to calculate the dimensions value. 

Eg. I have deposit as dimensions and there value is 

1 month

2 month

3 month

4 month 

Current month

I need to add up 1 month to 4 month as one value and add that value with current month value.

Is there any solution for this.

 

12 Replies
BrunPierre
Partner - Master
Partner - Master

Post your sample dataset and desired results.

Rocky6
Creator
Creator
Author

Broker   1 month 2 month 3 month 4 month 5 month   currentmonth

 aa             54456   34555        45566     34566       3456            674833

 rr             54456   34555        45566     34566       3456            674833

now i need to sum up the values from 1month to 5month as overdue and then add up with current month value 

Note: this 1month 2 month 3 month all come from a single dimension value as deposit. 

i dont have access to give u the correct data set. 

 

Rocky6
Creator
Creator
Author

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

HI @Rocky6 

Would this just be:

 sum([1 month]) + sum([2 month]) + sum([3 month]) + sum([4 month]) + sum([5 month]) + sum(currentmonth)

Better however would be to use the CROSSTABLE function, to put each value on a separate row with a month column, something like:

CROSSTABLE (Period, Value, 1)
LOAD
    *
FROM [... your data source ...];

You will find more information on CROSSTABLE in the help.

Steve

https://www.quickintelligence.co.uk/blog/

Rocky6
Creator
Creator
Author

@Steve i need to  declare in set analysis can you please help me out in this. 

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

@Rocky6 

What do you need to declare in set analysis?

Steve

Rocky6
Creator
Creator
Author

@Steve 

=Sum({<[Item ]={'1 Mth o/d'}>} [Final ]) + Sum({<[Item]={'2 Mths o/d'}>} [Final])
+ Sum({<[Item ]={'3 Mths o/d'}>} [Final]) + Sum({<[Item]={'4 Mths o/d'}>} [Final])
+ Sum({<[Item ]={'5 Mths o/d'}>} [Final]) + Sum({<[Item ]={'6 Mths o/d'}>} [Final ])

this is what i wrote in set analysis. is this the correct approach.

This will change for every month. 

One more thing is i have to show difference values of each date. 

Like today the value is 56 

tomorrow is 50

the third column should be difference of both i(e) 6 

how to bring this in table. 

thanks in advance. 

Rakesh 

Kushal_Chawda

@Rocky6  I would suggest create some dummy data in excel and provide the output you required. That will help you getting answer quickly

Rocky6
Creator
Creator
Author

@Kushal_Chawda  @stevedark 

  This 1 mo till 6month we should add as overdue and keep as one value Due amont Overdue+Due amount  
Broker 1 month  2 month 3 month 4month  5month 6month Current month Grand total  
aa 10 20 30 40 50 60 70 210+70=280  
                   

 

this should not be dynamic as user need to add more months in the overdue section. 

one more thing is grand total of every month starting and that value we need to minus with daily data

                   
Broker GRand Total 20/04/23 Difference  21/04/23 Difference 22/04/23 Difference    
aa 1500 1000 500 500 1000 1000 500