Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Re: if condition not working properly

I tried the above mentioned query but count returns only 0 and 1,nothing else.

Highlighted
MVP & Luminary
MVP & Luminary

Re: if condition not working properly

Hi Neha,

I think it is not possible to calculate in backend, try like this

Load all the data and then use this Set Analysis expression

=Count({<COMPONENT_NAME={'IRON AS FE'}, RESULT_VALUE={'>15'}>} TEST_ID)

Regards,

jagan.

Creator III
Creator III

Re: if condition not working properly

Hi All,

I found the solution for this.

Final:

LOAD TEST_ID,

     COMPONENT_NAME,

     RESULT_VALUE,

     if(upper(COMPONENT_NAME)='IRON AS FE' and RESULT_VALUE >=15,RESULT_VALUE)  as Ind

     FROM

[RESULT.qvd]

(qvd);

temp:

load distinct Ind as IND1

Resident Final Where Exists (Ind);

let v_var=NoOfRows('temp');

load distinct *,'$(v_var)' as Count resident Final;

Here we can get the count at backend only.

View solution in original post

Highlighted
MVP & Luminary
MVP & Luminary

Re: if condition not working properly

Hi Neha,

Try this simple script

Source:

LOAD * INLINE [

    COMPONENT_NAME, RESULT_VALUE, TEST_ID

    IRON AS FE, 18, 299

    MN, 20, 768

    AG, 21, 578

    IRON AS FE, 24, 765

    IRON AS FE, 4, 676

];

Data:

LOAD

COMPONENT_NAME,

Count(TEST_ID) AS Result_GR_15

RESIDENT Source

WHERE COMPONENT_NAME = 'IRON AS FE' AND RESULT_VALUE > 15

GROUP BY COMPONENT_NAME;

Regards,

jagan.