Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramesh123
Contributor
Contributor

Conversion of multiple rows to single row

Hi,

Any suggestion on having single row instead of 2 rows per attached snapshot.

We have 2 dimensions with week(2 days) Sales details. Need to have in single row.IMG_20230615_025754.jpg

Labels (2)
2 Replies
Aditya_Chitale
Specialist
Specialist

Something Like this ?

Aditya_Chitale_0-1687158759782.png

 

test:
load  * inline
[
ItemManufactureName , ItemManufactureCode , Week , Day , Sales , Week2 , Day2 , Sales2
BERTAZZON , BERT , , , 0 ,   6/13/2023 , Tue , -230.4
BERTAZZON , BERT , 6/12/2023 , Mon , 369.54, , , 0
];
 
NoConcatenate
 
test2:
load
ItemManufactureName,
    ItemManufactureCode,
    concat(Week & ',') as Week,
    Concat(Day & ',') as Day,
    sum(Sales) as Sales,
    Concat(Week2  & ',') as Week2,
    Concat(Day2 & ',' ) as Day2,
    Sum(Sales2)  as Sales2
Resident test group by ItemManufactureName, ItemManufactureCode;
 
Drop table test;
 
 
Regards,
Aditya

 

Aditya_Chitale
Specialist
Specialist

You can also use concat(field_name) in chart expression. But you will have to add  the field as a measure.

Regards,

Aditya