Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading only the maximum value to every cell in a column

Dear community,

I have a case where I need to create a column the maximum value that is in another column.

The data looks like this:

DateData
01.01.2015100
01.01.2015200
150
01.01.2016100
120
01.01.2018130
140
01.01.2015170

The goal is to get a column with the max date in every cell:

DateData
01.01.2018100
01.01.2018200
01.01.2018150
01.01.2018100
01.01.2018120
01.01.2018130
01.01.2018140
01.01.2018170

I have a big data set and multiple sheets, so I need to make the operation nice and easy.

Thank you guys!

4 Replies
tresesco
MVP
MVP

temp:

Load

          max(Date) as MaxDate

From <>;

Let vMaxDate=Date(Peek('MaxDate'));

Drop table temp;

final:

Load

          '$(vMaxDate)' as Date,

          Data

From <>;

MayilVahanan

Hi

try some thing like this

Table1:

LOAD Date(Date#(Date,'DD.MM.YYYY')) as Date, Data INLINE [

    Date, Data

    01.01.2015, 100

    01.01.2015, 200

    ,150

    01.01.2016, 100

    ,120

    01.01.2018, 130

    ,140

    01.01.2015, 170

];

Join(Table1)

LOAD Date(max(Date)) as MaxDate Resident Table1;

Edit:

Use, MaxDate as Dimension.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Kushal_Chawda

Please see the attached one

Not applicable
Author

Please find the attached QVW file.I have done it at script level.