Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcoserilio
Contributor III
Contributor III

Comparing First and last element of a a 10 days range limited dataset

Hi,

I'm trying to accomplish the following: I've got a dataset made of total market sales per day, I need to get to last day total sales-10 days before total sales, to get to total sales in the last 10 days. Now, I was able to kind of getting to it by using today() function, but my goal to make the report dinamically ever taking into account the last 10 days only, i'd need to use the data field instead.  

sum( {<Data={"$(=Date(Max({1}today())-2))"}>}ItaliaG)-

sum( {<Data={"$(=Date(Max({1}today())-14))"}>}ItaliaG)

 

 

marcoserilio_0-1619686228501.png

 

1 Solution

Accepted Solutions
marcoserilio
Contributor III
Contributor III
Author

figure it out. Thanks anyway. I have to get rid of " " to make it work

Sum({<ItaliaG={$(=Max(ItaliaG))}>}ItaliaG)-Sum({<ItaliaG={$(=Max(ItaliaG,10))}>}ItaliaG)

View solution in original post

1 Reply
marcoserilio
Contributor III
Contributor III
Author

figure it out. Thanks anyway. I have to get rid of " " to make it work

Sum({<ItaliaG={$(=Max(ItaliaG))}>}ItaliaG)-Sum({<ItaliaG={$(=Max(ItaliaG,10))}>}ItaliaG)