Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jiwaniakbiar
Contributor II
Contributor II

Count non performing centers

I have a table which has events listed. Each event is associated with Centerid

There is another table which has Centerid and CenterName

Each Center is belongs to a Area

Each Area belongs to Region.

I want to create a report which shows Region-wise report of Centers with 0 Events.

Table Structure is as follows:

EventMaster

EventID, EventName, CenterID

CenterMaster

CenterID CenterName AreaID

AreaMaster

AreaID AreaName RegionID

RegionMaster

RegionID RegionName

4 Replies
vamsee
Specialist
Specialist

Hello,

Use the following to create a flag for events.


Flag_No_Event:
Mapping LOAD
CenterID,
EventID

FROM EventMaster;

CenterMaster:
LOAD
CenterID,
CenterName,
IF( Len(ApplyMap('Flag_No_Event',CenterID,NULL()))<1, 'No Event', 'Has Events') as Flag_No_Events
From Source
;

--------


In you UI charts filter based on this Flag.

Dimension: Region --> Area --> Center (Drill Down or Cyclic)



Expression: IF( Flag_No_Events ='No Event', 1, 0)

jiwaniakbiar
Contributor II
Contributor II
Author

Thanks. Should I add this to load generation script under Auto-Generated section?

vamsee
Specialist
Specialist

The mapping load has to be before the load of Center Master. I don't quite understand what you meant by Autogenerated Section.

wdchristensen
Specialist
Specialist

Autogenerated is the name the GUI uses to autoname your section. This means you didn't write the code, you used the select data source and selected your source table/view and QLIK added the code for you.

So Akbar, you should add this to the Auto-Generated section of your load script.