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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limiting data using Only-function

Hi,
I have sales data that I'm trying to limit in table/chart using Only-function in Expression.
Sum
({$<[YEAR]={$(=Only([YEAR])) }>} Sales)
Now I'm trying to limit the data also with month, but without any success. Is it possible to limit things using Only-function several times like this?
Sum
( if ([YEAR]= [YEAR]-1, {$<[MONTH]={$(=Only([AsOfMonth])) }>} Sales )
I know, this does not work. The idea here is to limit year to be last year and month should be selected.
Second question: I shoul also calculate last 12 months sales from same table. There is date, month, year etc available. What would be the best way to do that?

Here is the sample report.

21 Replies
Not applicable
Author

Hi again,

There are two issues:

No 1:

There is something wrong with 12 months sales. If I choose eg only one costcenter, the number won't change and numbers are wrong too. Look at the example file sent here May 12th

No 2:

How to calculate 4 weeks average on week level? There a sample of report here as well few message back.

Ville

Not applicable
Author

Thanks DV ,

i was looking for diffrence between $ and  {1} for many days your explantion helped me a lot !!

  Thanks Good !!!!

Regards,

  Anant