Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
kvijay173
Creator
Creator

Count if the Occurrence is not in Multiple state

Hi Friends,

I have a data with Computer Name, Installation Status, Health State. Some computers will have the status as INSTALLED and not FAILED. But some computers will have both INSTALLED and FAILED.

Capture.PNG

I would like to create a table for Health State as below. If you look at the below result the total computers is 9 (distinct). But 5 computers are a member of Installed status only. I already have a similar report in Tableau. But now we are moving on to QlikView from Tableau. I dont know how to achieve this in QlikView.

1.PNG

13 Replies
sunny_talwar

May be like this (assuming all the above your mentioned are un-healthy)

Dimension

If(Match(Status, 'Failed', 'Not Installed', 'Downloaded'), 'Un-Healthy', 'Healthy')

Expression

=Count(DISTINCT {<[Computer Name] = e({<Status = {'Failed', 'Not Installed', 'Downloaded'}>})>+<Status = {'Failed', 'Not Installed', 'Downloaded'}>} [Computer Name])

View solution in original post

vinieme12
Champion II
Champion II

create that 3 field in script buddy

swuehl
MVP
MVP

If you have a lot of field values belonging to unhealthy and these may change over time, focus on healthy / installed instead:

=If(Status='Installed','Healthy','Unhealthy') =Count(DISTINCT {<[Computer Name] = e({<Status -= {'Installed'}>})>+<Status -= {'Installed'}>} [Computer Name])
9
Healthy5
Unhealthy4
kvijay173
Creator
Creator
Author

Thanks Sunny. Completed the report with your valuable suggestions. Thanks to all suggestions from others.