Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
saichawan
Contributor III
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
sunny_talwar

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')
saichawan
Contributor III
Contributor III
Author

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.

sunny_talwar

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

saichawan
Contributor III
Contributor III
Author

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.

 
saichawan
Contributor III
Contributor III
Author

any help please ?

sunny_talwar

Would you be able to share the qvw file?

saichawan
Contributor III
Contributor III
Author

sure,

 

sunny_talwar

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?

saichawan
Contributor III
Contributor III
Author

Do you want me the sample excel file ?