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

max dates

In the excel file have some data in sheet1 and  output two sheets is their . in the second one output also mentioned

but I want in qlikview script level logics

7 Replies
Anil_Babu_Samineni

You can explain the logic behind to achieve, for output days and output block

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
Anonymous
Not applicable
Author

output days means for each product how many days blocked the data  for output block

Anonymous
Not applicable
Author

in the

in the above snapshot data1,data2,data3,data4  blocked  3 days for this product then

output show like

Anil_Babu_Samineni

Looks like you need concat() in script? Can you look help?

Sample:

LOAD Date,

     Product,

     data1 as ConcatData,

     'data1' as Flag

FROM

(ooxml, embedded labels, table is Sheet1);

LOAD Date,

     Product,

     data2 as ConcatData,

     'data2' as Flag

FROM

(ooxml, embedded labels, table is Sheet1);

LOAD Date,

     Product,

     data3 as ConcatData,

     'data3' as Flag

FROM

(ooxml, embedded labels, table is Sheet1);

LOAD Date,

     Product,

     data4 as ConcatData,

     'data4' as Flag

FROM

(ooxml, embedded labels, table is Sheet1);

LOAD Date, Product, Concat(ConcatData, '%') as Simple Resident Sample Group By Date, Product;

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
Anonymous
Not applicable
Author

I want max days count and the particular data

Anonymous
Not applicable
Author

its not working go to cross table logic

Anonymous
Not applicable
Author

go for this logic

where we write the concat function


Temp1:
CrossTable(ProductNumber, ProductName,2)
Load
Date,
Product,
data1,
data2,
data3,
data4
Resident Data;

NoConcatenate
Temp2:
Load Date, Product, Trim(ProductNumber) as ProductNumber, Trim(ProductName) as ProductName Resident Temp1;

Drop Table Temp1;

Temp3:
Load Product, ProductName, COUNT(Distinct Date) as TotalName Resident Temp2 Group By Product, ProductName;
Left Join(Temp3)
Load Product, Max(TotalName) as Mcpdays Resident Temp3 Group By Product;

Drop Table Temp2;
Join (Temp3)
Load Product, Max(TotalName) as Mcpdays Resident Temp3 Group By Product;

Left Join (Data)
Load Product, ProductName, Mcpdays Resident Temp3 Where TotalName = Mcpdays;

Drop Table Temp3;