Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help on formulae

Dear experts,

I need to make some calculation based on this example:

FechaDMI 5-Ene7-Ene12-Ene13-Ene18-Ene22-Ene
258425122479246925142503


I would like to have an expresion that show the tendency between the last date (22-ENE 2503) and the previous date (18-Ene 2514). As yoy see, the range between dates are diferents, and will always diferent.

I can choose the las date with the MAX(Fecha DMI) but how can I choose a previous date. Thanks in advance for your help, I'm new in QlickView, so you know that any help, tric, tips etc... are well apreciated from the gurus and experts.

Patrick

1 Solution

Accepted Solutions
boorgura
Specialist
Specialist

hey Patrick,

if you can get the max date using MAX(Fecha DMI)

then, it is obvious that you have the attribure Fecha DMI, right?

so you can do MAX(Fecha DMI, 2) to the second max date.

Thanks,

Rocky

View solution in original post

3 Replies
Not applicable
Author

Hi,

First, you'd better transpose your table with 2 fields fecha & value. You can use CrossTable function in the script.

After, you can use Max( Fecha , 2 ) to get the previous date, Max( Fecha , 3) ...

Then it depends of what you want to display. I need more precision of your goal. Why not create a plot with date as dimension & the gap between 2 dates.

Regards

JJ

Not applicable
Author

Jean-Jacques,

thanks for your replya, but what I forgot to say is that the values from eadch dates, come from an expresion, there are not a value ina a table. So for each date, all the numbers are the result of an expresion. Hope this is clear.

The goal, is that each time I reload the datas from the databases, I can see the last two dates in a table with there values, and the last column, will be the diference between the last 2 dates.

boorgura
Specialist
Specialist

hey Patrick,

if you can get the max date using MAX(Fecha DMI)

then, it is obvious that you have the attribure Fecha DMI, right?

so you can do MAX(Fecha DMI, 2) to the second max date.

Thanks,

Rocky