Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

filling the data

Hi Friends,

I have the below source file including the below 2 fields Level1 and Level2, using these two fields i have to get the COA field.

the conditions are:

1) if level 2 is having data that should reflect in the COA field,

2) if level 2 is null then it has to consider  level1 data  in the COA field

3) if the two fields are blank it has to take the above of that data

Is this possible to do in Qlikview?

Please help me....

Level1Level2COA
Vehicle LoansVehicle Loans - Fixed RateVehicle Loans - Fixed Rate
Vehicle Loans - Fixed Rate
Vehicle Loans - Fixed Rate
Vehicle Loans - Variable RateVehicle Loans - Variable RateVehicle Loans - Variable Rate
Vehicle Loans - Variable Rate
Personal LoansPersonal Loans - Fixed RatePersonal Loans - Fixed Rate
Personal Loans - Fixed Rate
Personal Loans - Fixed Rate
Personal LoansPersonal Loans
Personal Loans

ll

9 Replies
tresesco
MVP
MVP

Try like:

  If( Len(Trim(COA))=0, Peek(COA), COA) as NewCOA

Not applicable
Author

Yes.

For first two requirements,

if( length(level2)>0,level2,

if(length(level2)=0,level1)) as COA

For third requirement can you please share sample qvw?

thanks

Khushboo

marcus_sommer

This could be solved with Peek() or Previous() ?

- Marcus

Anonymous
Not applicable
Author

may be this at script:

=if(Level2<>null() or Level2<>'', Level2, IF(Level1='' or Level2='', Previous(Level1)) as COA

   

Not applicable
Author

Dear Tresesco,

thank you for the quick reply.

i do not have a field COA, i have to create with existing fields.

any other idea?

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

LOAD

*,

  If( Len(Trim(Level2))> 0, Level2, Level1) as COA

FROM DataSource;


Hope this helps you.


Regards,

jagan.

tresesco
MVP
MVP

Missed some points.

Try:

If(Len(Trim(Level2))=0, If(Len(Trim(Level1))=0, Peek(Level2), Level1), Level2) as COA

Not applicable
Author

Hi friends,

i completed the requirement with you people help,

Facing an issue here that,

if u see my attachment, some of the values are not visible in my chart but they are populating in the list box.

what might be the issue?

Anonymous
Not applicable
Author

Could you post some sample data?