Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

An interesting scenario

I have the data like this. Employee id, their home location and work location

Employee Home Work

101               A            B

102              A             C

103              A             A

104              C             B

105               C            C

106               B            A

I need a graph like this. Is this possible?

Work    WorkCount   HomeCount

A              2                         3

B              2                         1

C             2                           2

12 Replies
Anonymous
Not applicable
Author

PFA

qlikpahadi07
Specialist
Specialist

Hi Ram Kumar,

PFA with Front end

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this script

Temp:

LOAD

*

INLINE [

Employee, Home, Work

101,               A,            B

102,              A,             C

103,              A,             A

104,              C,             B

105,               C,            C

106,               B,            A];

Data:

LOAD

Employee,

Home AS Location,

'Home' AS LocationType

RESIDENT Temp;

Concatenate(Data)

LOAD

Employee,

Work AS Location,

'Work' AS LocationType

RESIDENT Temp;

Now in chart,

Dimension : Location

Expressions:

Home Count : count({<LocationType={'Home'}>} Employee)

Work Count: count({<LocationType={'Work'}>} Employee)

Regards,

Jagan.

Not applicable
Author

TThanks Jagan. But I can't touch the script, need to do this somehow in the front end.

qlikpahadi07
Specialist
Specialist

Did you saw my attachment I have done that in front end

Not applicable
Author

Not yet. Cant open attachments now because of restrictions. Accessing this thread by phone

But can open after 2 hrs

Sent from my iPhone

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Try Below one

Dimention :

=if($Field='Work',Work,if($Field='Home',Home))

Expresions:

Home

Count(if($Field='Home',Home))

Work

Count(if($Field='Work',Work))

Not applicable
Author

Can't afford to do this as the data I show here is just a sample

Not applicable
Author

Thanks Nitin but I'm actually looking to do something at the front-end level