Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
dandaanilreddy
Partner - Creator III
Partner - Creator III

How to insert a blank row into a field after each value

Hello All,

I have a user requirement to show blank row after each dimension field value. Please can someone let me know how can i insert blank record while loading the table into qlik sense? I have attached the sample data and the expected output.

Thank You!! 

Labels (1)
5 Replies
sbaro_bd
Creator II
Creator II

Hi @dandaanilreddy ,

With the native objects, it's not possible. Perharps with a extension if this one exists. Explain that to your end users (be diplomatic) . The current view is also good.

sbaro_bd_0-1695827229564.png

Regards.

 

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

@sbaro_bd 

Thanks for your response. Is there any possibility to achieve the below output (attached) in straight table ?

 

Expected Output In Straight table
Samsung TV
Samsung Mobile
Samsung Home Theater
   
Apple Ipad
Apple Desktop
Apple Mobile
Apple Airpods
   
pallavi_96
Partner - Contributor III
Partner - Contributor III

Hi Dandaanilreddy,

Your problem has a workaround, which I have.This should be able to assist you, I hope.

Table:
LOAD * Inline [
Brand ,Product
Samsung ,TV
Samsung ,Mobile
Samsung ,Home Theater
Apple ,Ipad
Apple ,Desktop
Apple ,Mobile
Apple ,Airpods
];
Left Join(Table)
LOAD Brand,
If(Brand = Previous(Brand), Peek('RowNo'), RangeSum(Peek('RowNo'), 1)) as RowNo
Resident Table
Order By Brand;

NoConcatenate
Blank:
Load *,
if(len(Brand)<=0,'',Product) as NewProduct;
Load
Product,
Brand as oldBranch,
RowNo,
If(RowNo <> Previous(RowNo), '', Brand) as Brand
Resident Table
Order By RowNo;

drop table Table;
exit script;

 

 

sin_0-1695886499158.png

 

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

@pallavi_96  Thank You for your help. This will work but only issue here is using row no as dimension which is ok as without adding row no blank line wont appear in the table. Just checking with you if there is any way we can hide the row no in the dimension but still get the expected output?

 

Thank You!!!

pallavi_96
Partner - Contributor III
Partner - Contributor III

Hello, @dandaanilreddy

I'll try to think of another approach and get back to you.

 

Regards,

Pallavi