Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD values in straight table

Hi experts ,

I have a requirement in my project where I have to divide the ytd values for 2 different KPI , PFB the explanation :

1)I have a KPI whose monthly values are like : Jan 100 , Feb 200 , March 300

2)I have another KPI whose monthly values are like : Jan 10 , Feb 20 , March 30

So if I take sum of these individual KPIs the calculation is like :

(100+200+300)/(10+20+30) =10

but I need it like this

100/10 + 200/20 + 300/30 = 30

I tried taking average of denominator but that scenario is not working and data is not matching upto 2 decimal places .

Can you please help in resolving this issue ?

sum({<{<month_num1={">=$(vMonth1)<=$(vMonth)"}>}Sales)

/

sum({<month_num1={">=$(vMonth1)<=$(vMonth)"}>} Volume))

vmonth1 =1 .

vMonth = month number for current month .

1 Solution

Accepted Solutions
Partner
Partner

Use the Aggr function. Please see attached qvw

View solution in original post

1 Reply
Partner
Partner

Use the Aggr function. Please see attached qvw

View solution in original post