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: 
andreip21
Contributor III
Contributor III

price evolution on 2 different dates

Hi there,

i have one big data table containing:

 

DateProductPrice
23-Apr1100
24-Apr1100
25-Apr1120
26-Apr1120
27-Apr1120
28-Apr1120
23-Apr2430
24-Apr2430
25-Apr2430
26-Apr2430
27-Apr2430
28-Apr2430
23-Apr350
24-Apr340
25-Apr340
26-Apr350
27-Apr350
28-Apr340
23-Apr4250
24-Apr4250
25-Apr4250
26-Apr4250
27-Apr4250
28-Apr4280

when selecting 2 dates (28 apr & 23 apr)

i want to obtain the following chart table, comparing the evolution of price from min(date) = 23 apr until max(date) = 28 apr:

    

Price IncreasePrice constantPrice decrease
No Products211

how can i do this?

Thx,

Andrei

4 Replies
MK_QSL
MVP
MVP

Create a Straight Table


Use Calculated Dimension

='Number Of Products'

Expressions

Price Increase

SUM(Aggr(IF(Only({<Date = {"$(=Date(Min(Date)))"}>}Price) - Only({<Date = {"$(=Date(Max(Date)))"}>}Price) > 0, 1),Product))

Price Constant

SUM(Aggr(IF(Only({<Date = {"$(=Date(Min(Date)))"}>}Price) - Only({<Date = {"$(=Date(Max(Date)))"}>}Price) = 0, 1),Product))

Price Decrease

SUM(Aggr(IF(Only({<Date = {"$(=Date(Min(Date)))"}>}Price) - Only({<Date = {"$(=Date(Max(Date)))"}>}Price) < 0, 1),Product))

HTH

Regards,

MK

shiveshsingh
Master
Master

Try this.

shiveshsingh
Master
Master

or may be this

=sum(aggr(if (sum({<Date= {"$(=date(max(date#(Date,'DD-MMM')),'DD-MMM'))"}>}Price)> sum({<Date= {"$(=date(min(date#(Date,'DD-MMM')),'DD-MMM'))"}>}Price),1,0),Product))

=sum(aggr(if (sum({<Date= {"$(=date(max(date#(Date,'DD-MMM')),'DD-MMM'))"}>}Price)< sum({<Date= {"$(=date(min(date#(Date,'DD-MMM')),'DD-MMM'))"}>}Price),1,0),Product))

=sum(aggr(if (sum({<Date= {"$(=date(max(date#(Date,'DD-MMM')),'DD-MMM'))"}>}Price)= sum({<Date= {"$(=date(min(date#(Date,'DD-MMM')),'DD-MMM'))"}>}Price),1,0),Product))

MarcoWedel

Hi,

another solution might be:

QlikCommunity_Thread_299813_Pic1.JPG

QlikCommunity_Thread_299813_Pic2.JPG

=Aggr('Price '&Pick(Sign(FirstSortedValue(Price,-Date)-FirstSortedValue(Price,Date))+2,'decrease','constant','increase'),Product)

QlikCommunity_Thread_299813_Pic3.JPG

hope this helps

regards

Marco