Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

data compare on date

Hi,

I have a pivot table.
I want to show a letter "A" if the value resulting by the expression of the current selection is bigger than then same expression evaluated on the previous week, else I have to show the letter "B".

Suppose that my expression is something like that :

(Sum(X) / ((Sum(Y)- Sum (Z))

and my dimension is

OrderDate

How can I obtain what I have explained at the top of the post ?

Thanks a lot.

4 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

here is an example for set analsys

i hope it helps

you described somthing not that clear , because if order date is the dim , then it dosent have value in other week.

once again

i hope the example helps

Not applicable
Author

Hi,

I try to explain better : yes Date is the dim.

If the expression is calculated for the current value "15/01/2010" I want even to show the value for "08/01/2010" on the same row of the pivot table.
Than I can calculate the difference and plot "A" or "B".

I hope I explained better :))

Thank a lot for your help

Not applicable
Author

hi,

I upload an example.
What I would like to do is to show in the second column (Average previous sale) of the pivot table the average amount of sales of the previous week (if exist, if not exist display an "-").

So I can compare today's sale with the average of the previous week.

How can I do this ?

thanks a lot.

johnw
Champion III
Champion III

One common solution is a date island:

DateIsland:
LOAD DISTINCT Date as FakeDate
RESIDENT Sales;

Then use FakeDate as the dimension, and these expressions:

sum(if(Date=FakeDate,SaleAmount))

sum(if(Date>=FakeDate-7 and Date<FakeDate,SaleAmount))/7