Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Using If Condition

Hi Team,

I have a scenario like below

LOAD [Sales docu_DOC_NUMBER./BIC/AZDAT_O2300][Item_S_ORD_ITEM./BIC/AZDAT_O2300]  as KEY,
[Network Ac_ACTIVITY./BIC/AZDAT_O2300],
[Network_NETWORK./BIC/AZDAT_O2300],
[Project De_PROJECT./BIC/AZDAT_O2300],
[WBS Elemen_WBS_ELEMT./BIC/AZDAT_O2300],
[Routing nu_PUR_AUFPL./BIC/AZDAT_O2300],
[Counter_/BIC/ZAPLZL./BIC/AZDAT_O2300],
[Sequence N_/BIC/ZSEQNO./BIC/AZDAT_O2300],
[RecordMode_RECORDMODE./BIC/AZDAT_O2300],
[Company co_COMP_CODE./BIC/AZDAT_O2300],
[Earliest S_/BIC/ZESHSDT./BIC/AZDAT_O2300],
[Earliest F_/BIC/ZEFINDT./BIC/AZDAT_O2300],
[Latest Sch_/BIC/ZLSHSDT./BIC/AZDAT_O2300],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 1000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 1000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 2000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 2000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 3000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 3000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 4000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 4000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 5000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 5000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 6000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 6000 Actual End Date]
,

Here am using a condition , and storing the data in different Columns,

And O/P is shown like below

But my expected O/P is all the data should be shown in single row

Ex :

\\How to Achieve this.?

3 Replies

Re: Using If Condition

try this


Data:

LOAD [Sales docu_DOC_NUMBER./BIC/AZDAT_O2300][Item_S_ORD_ITEM./BIC/AZDAT_O2300]  as KEY,
[Network Ac_ACTIVITY./BIC/AZDAT_O2300],
[Network_NETWORK./BIC/AZDAT_O2300],
[Project De_PROJECT./BIC/AZDAT_O2300],
[WBS Elemen_WBS_ELEMT./BIC/AZDAT_O2300],
[Routing nu_PUR_AUFPL./BIC/AZDAT_O2300],
[Counter_/BIC/ZAPLZL./BIC/AZDAT_O2300],
[Sequence N_/BIC/ZSEQNO./BIC/AZDAT_O2300],
[RecordMode_RECORDMODE./BIC/AZDAT_O2300],
[Company co_COMP_CODE./BIC/AZDAT_O2300],
[Earliest S_/BIC/ZESHSDT./BIC/AZDAT_O2300],
[Earliest F_/BIC/ZEFINDT./BIC/AZDAT_O2300],
[Latest Sch_/BIC/ZLSHSDT./BIC/AZDAT_O2300]

FROM Table:


left join(Data)

LOAD KEY,
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 1000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 1000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 2000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 2000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 3000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 3000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 4000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 4000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 5000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 5000 Actual End Date],
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 6000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 6000 Actual End Date]

Resident Data;



Not applicable

Re: Using If Condition

Hi Kushal,

Thanks for the reply. If we are using left join , only the MileStone 1000 will be displayed. The other values will be NULL

Re: Using If Condition

then do the left join for each if condition

Data:

LOAD [Sales docu_DOC_NUMBER./BIC/AZDAT_O2300][Item_S_ORD_ITEM./BIC/AZDAT_O2300]  as KEY,
[Network Ac_ACTIVITY./BIC/AZDAT_O2300],
[Network_NETWORK./BIC/AZDAT_O2300],
[Project De_PROJECT./BIC/AZDAT_O2300],
[WBS Elemen_WBS_ELEMT./BIC/AZDAT_O2300],
[Routing nu_PUR_AUFPL./BIC/AZDAT_O2300],
[Counter_/BIC/ZAPLZL./BIC/AZDAT_O2300],
[Sequence N_/BIC/ZSEQNO./BIC/AZDAT_O2300],
[RecordMode_RECORDMODE./BIC/AZDAT_O2300],
[Company co_COMP_CODE./BIC/AZDAT_O2300],
[Earliest S_/BIC/ZESHSDT./BIC/AZDAT_O2300],
[Earliest F_/BIC/ZEFINDT./BIC/AZDAT_O2300],
[Latest Sch_/BIC/ZLSHSDT./BIC/AZDAT_O2300]

FROM Table:


left join(Data)

LOAD KEY,
if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 1000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 1000 Actual End Date]

Resident Data;


left join(Data)

LOAD KEY,

if([Network Ac_ACTIVITY./BIC/AZDAT_O2300] = 2000 ,  [Actual Sta_/BIC/ZACTSDT./BIC/AZDAT_O2300]) as [MileStone 2000 Actual End Date]

Resident Data;


left join(Data)

.

.

.

.

Community Browser