Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
mohammadkhatimi
Partner - Specialist
Partner - Specialist

I want to display 3 rows the third row will be repeated based on condition.

Hi,

sunindia

gwassenaar

id

Duration

Amount

Receipt

Is_active flag

123

6months

100

abc

N

123

1 year

120

xyz

Y

123

6 Months

-100

abc

N

Explanation:- The end user wants to see the third row in negative as well but we are not able to generate it as the database has only two rows.

Please help me with this issue.

Its bit Urgent.

Regards,

Mohammad

6 Replies
sunny_talwar

One what basis are you generating the third row?

ali_hijazi
Partner - Master II
Partner - Master II

if you have the condition to get which row you want then you can concatenate the third row(s) as follows:

concatenate(your_table)

load id, duration, Amount*-1 as Amount, receipt,'N' as is_active_flag

resident your_table

where your_condition

I can walk on water when it freezes
Kushal_Chawda

On what conditions 3rd row will be generated?

tyagishaila
Specialist
Specialist

share sample data,

Chanty4u
MVP
MVP

try this

Load [ID], SubField([duraion],' ') as [duration];

LOAD [ID],

     [duration]

FROM

sample.xlsm

(ooxml, embedded labels, table is [RW Sheet]);

settu_periasamy
Master III
Master III

Hi,

May be like this..

T1:
LOAD * INLINE [
id, Duration, Amount, Receipt, Is_active flag
123, 6months, 100, abc, N
123, 1 year, 120, xyz, Y
]
;

Concatenate(T1)

LOAD  id, Duration, Amount*-1 as Amount, Receipt, [Is_active flag] Resident T1 Where [Is_active flag]='N';

Capture1.JPG