Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
saichawan
New Contributor III

nested aggregation not allowed

Hi,

I need a urgent help on this. i need to find rate of sale, the number of units sold pe week for current and previous year. below is the formula i'm using.

 ='Current Year:'&Num( Sum({<[Trading Week End Date] = {'$(=Year(Today()))'}>} (RTL_QTY) /Count(date)),'##.00')&
' Last Year:'&Num(Sum({<[Trading Week End Date] = {'$(=Year(Today())-1)'}>} (RTL_QTY) /Count(date)),'##.00') 

can you please help with the solution.

16 Replies
Highlighted

Re: nested aggregation not allowed

Try this may be

'Current Year:' & Num(Sum({<[Trading Week End Date] = {'$(=Year(Today()))'}>} RTL_QTY)/Count(date), '##.00')
&
' Last Year:' & Num(Sum({<[Trading Week End Date] = {'$(=Year(Today())-1)'}>} RTL_QTY)/Count(date), '##.00')
Highlighted
saichawan
New Contributor III

Re: nested aggregation not allowed

It's not working,  the count is zero for the code you helped me with. Also this string i'm using is in a text object.

Highlighted

Re: nested aggregation not allowed

Would you be able to share a sample to show the issue?

Highlighted
saichawan
New Contributor III

Re: nested aggregation not allowed

Untitled.pngUntitled1.pngBasically i'm not calulating the rate of sales(ros) . number of retail quanityt per week. when i'm perfoming this in excel the ros is 121.23 and in qlickview the above formula the ros is 12663.72.

 
Highlighted
saichawan
New Contributor III

Re: nested aggregation not allowed

any help please ?

Highlighted

Re: nested aggregation not allowed

Would you be able to share the qvw file?

Highlighted
saichawan
New Contributor III

Re: nested aggregation not allowed

sure,

 

Highlighted

Re: nested aggregation not allowed

Thank you for the sample qvw... How exactly do you get 121.23 in Excel? What two numbers are you using to get to this number? Is the denominator 104 correct or do you want this to be another number? and what about the numerator?

Highlighted
saichawan
New Contributor III

Re: nested aggregation not allowed

Do you want me the sample excel file ?