Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

How to do rangesum with division

I have a Target data from Jan to Dec 2020 where  Jun 2020 target is 50%.

I want to calculate the % starting from Jun

July is Jun+(50%/3)= 66.67%, Aug is 66.67%(July)+(50%/3)=83.33% and so on.

JuneJulyAugustSeptemberOctoberNovemberDecember
50%66.67%83.33%100%100%100%100%

 

Please help me with the solution.

Thanks in Advance.

@sunny_talwar @Anil_Babu_Samineni 

Regards,

Kavita

Labels (1)
11 Replies
sunny_talwar
MVP
MVP

Do you already have 50% for June in your data? Do you have 0% for July or do you have another value in the database? And how do you get  50% + 50%/3 for July?

kavita25
Partner - Specialist
Partner - Specialist
Author

Yes I already have Jun as 50%. and previous value with(50%/3) is fixed.

Thanks for your response.

Regards,

Kavita

sunny_talwar
MVP
MVP

"previous value with(50%/3) is fixed"

Not sure what this means?

kavita25
Partner - Specialist
Partner - Specialist
Author

Hello,

Please find the screenshot:

kavita25_0-1589287205642.png

June is set as 50%.

July is June+(Fixed value(50%/3))=66.67%

Aug is July +(Fixed value(50%/3))=83.33%

Regards,

Kavita

sunny_talwar
MVP
MVP

Oh okay, 50% is not dependent on the fact that June is 50%. Even if June was 20%, you would still have added 50%/3 to it? Also, do you have value for Jan, Feb, Mar, Apr, May, Jun? or are those all 0?

kavita25
Partner - Specialist
Partner - Specialist
Author

Yes.. Jan to May is 0.

Regards,

Kavita

sunny_talwar
MVP
MVP

How about my other question? What if Jun's value was 20%? Would you still want Jul to be 20% + 50%/3?

kavita25
Partner - Specialist
Partner - Specialist
Author

Yes. 

(20%)+(50%/3).

Regards,

Kavita.

 

sunny_talwar
MVP
MVP

I would do something like this

If(Month >= June, RangeSum(Sum(TOTAL Target), (Month - 6)*0.1666666, 0)

I have a feeling this won't work the way you want, but I still don't have enough details to be able to offer you more help.