Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
himani_a_agrawa
New Contributor II

Build Logic to repetitive devices as 1, using loops/sum/count/if/set analysis

Hi All, 

Please help me building logic on below scenario. 

I have a data(attached), in which there are many device saying A/B/C.., with their server up/down status being 1/0 respectively and dates(24 Hour) correspondingly to it. 

What I want here is to Count No. of distinct devices in a dataset, which are UP in entire day for atleast once. Means, If any device is Up i.e 1  for atleast once in a day, then it is counted as 1, and check for other devices and count the others similarly.  and finally show the total UP devices Reported. Vice Versa for the devices which were Down whole day. 

I am sorry, if I am putting this again, But I did'nt find any post regarding this. 

I am not sure which function/loop will give the correct logic? Can we do it through loop, or set analysis can do this?

I am attaching a sample qvw with sample data-set, if anybody can help in building this logic, will be appreciable.

Thanks

 

2 Replies
mwoolf
Honored Contributor II

Re: Build Logic to repetitive devices as 1, using loops/sum/count/if/set analysis

Is this close to what you want?

 

Re: Build Logic to repetitive devices as 1, using loops/sum/count/if/set analysis

Hi,

 

maybe one solution could be:

  QlikCommunity_Thread_QlikView-Scripting_Build-Logic-to-repetitive-devices-as-1-using-loops-sum-count-if_m-p_1531170_Pic1.JPG

 

QlikCommunity_Thread_QlikView-Scripting_Build-Logic-to-repetitive-devices-as-1-using-loops-sum-count-if_m-p_1531170_Pic2.JPG

  

hope this helps

regards

Marco