Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jayati_shrivast
Contributor III
Contributor III

Fill column null value with previous not null value

Hi All,

I have a straight table layout as follows

ID             MODE       MSG

11                a                "how may i help u"

11                b                  null

12                a                 "may i know your name"

12                b                    null

13                 a                 "pls provide your contact details"

13                 b                    null

 

In place of null, I need to paste the same msg corresponding to particular ID  where mode = a  that is I should get the display as follows:

ID             MODE       MSG

11                a                "how may i help u"

11                b                 "how may i help u"

12                a                 "may i know your name"

12                b                  "may i know your name"

13                 a                 "pls provide your contact details"

13                 b                  "pls provide your contact details"

 

how can i implement this, pls help me out. In the database from where I am retrieving the data, for mode = b for all the id's msg  value is null. I need to implement the above in qliksense

Thanks

1 Reply
arusanah
Creator II
Creator II

hi Jayanti ,

Try this 

Data:
Load
ID,
MODE,
// MSG,
if( len(MSG ) = 0, peek(MSG), MSG) as MSG,

;

Fill_Data:
Load * Inline [
ID, MODE, MSG

11, a , "how may i help u"
11, b ,
12, a , "may i know your name"
12, b ,
13, a , "pls provide your contact details"
13, b ,
];

 

arusanah_0-1618340014053.png