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

Firstsorted value

Dateproductmax daysNumber
07/21/201777005500070001003654582-002
07/21/201777005500070001003729871-001
07/21/201777005500070001003773911-002
07/21/201777005500070001003777321-001
07/22/201777005500070001003654582-002
07/22/201777005500070001003729871-001
07/22/201777005500070001003773911-002
07/22/201777005500070001003777321-001
07/23/201777005500070001003654582-002
07/23/201777005500070001003729871-001
07/23/201777005500070001003773911-002
07/23/201777005500070001003777321-001

4 numbers are  blocking each date and days also same but i want output below one

654582-002,729871-001, 773911-002, 777321-001  in script level

7 Replies
sunny_talwar

Those numbers with which date? 7/23/2017 or 7/21/2017? If it is 7/23... you can try this

Fact:

LOAD Date,

     Product,

     [max days],

     Number

FROM ....;

Right Join (Fact)

LOAD Number,

     Max(Date) as Date

Resident Fact

Group By Number;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Can you post an example (in a table) of the expected output, based on your example data?

Anil_Babu_Samineni

May be this? I know, This is weird solution but result may give

SET DateFormat='MM/DD/YYYY';

And expression this?

Only({<Date = {'$(=Min(Date))'}>} Number)


And As Sunny Suggested, I believe Min(Date) can sort rather Max(Date)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

In Script part try this ways

Data:

LOAD Date(Date#(Date,'MM/DD/YYYY'),'MM/DD/YYYY') as Date,product, [max days],Number  Inline

[

Date, product, max days, Number

07/21/2017, 7700550007000100, 3, 654582-002

07/21/2017, 7700550007000100, 3 ,729871-001

07/21/2017, 7700550007000100, 3 ,773911-002

07/21/2017, 7700550007000100, 3, 777321-001

07/22/2017, 7700550007000100, 3, 654582-002

07/22/2017, 7700550007000100, 3, 729871-001

07/22/2017, 7700550007000100, 3, 773911-002

07/22/2017, 7700550007000100, 3, 777321-001

07/23/2017, 7700550007000100, 3, 654582-002

07/23/2017, 7700550007000100, 3, 729871-001

07/23/2017, 7700550007000100, 3, 773911-002

07/23/2017, 7700550007000100, 3, 777321-001

];

NewTable:

LOAD

Date,product,[max days],

Concat( Number,',') as New

Resident Data Group By Date, product, [max days];

DROP Table Data;


Output

OP44.PNG

vishsaggi
Champion III
Champion III

Hello Anand, Did you put the output from a different qvw? Does not match the data in the LOAD statement. Just FYI.

its_anandrjs

Thanks i change this now please check earlier i was trying to update but it not get update now it is changed.

vishsaggi
Champion III
Champion III

Thumbs Up!!