Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Grouping calculated dimensions

Hi, I have created two calculated dimensions called North Agents and South Agents like below.

North AgentsSouth Agents
David

Bob

StephenJane
AlexNancy
Jake

I want to create a new dimension called North South Agents including the North Agents and South Agents grouping. So the drill down would be like North South Agents -> North Agents & South Agents -> Bob, Jane, Nancy, Jake, David, Stephen, Alex.

Is there anyway I can do this? I would appreciate any answers. Front end calculated dimension is preferred but scripting is also very appreciated.

Thank you.

Tags (1)
5 Replies
Not applicable

Re: Grouping calculated dimensions

Hi,

You have to create a table like this :

AgentGroupSubGroup
DavidNorth SouthNorth
StephenNorth SouthNorth
AlexNorth SouthNorth
BobNorth SouthSouth
JaneNorth SouthSouth
NancyNorth SouthSouth
JakeNorth SouthSouth

The script depends on your data model.

Regards;

Xavier.

Not applicable

Re: Grouping calculated dimensions

Hi Xavier, is there a way to do this on the front end using set analysis and conditional statements?

ramoncova06
Valued Contributor III

Re: Grouping calculated dimensions

you need to create a calculated dimension like this

if(Agent = 'David' or Agent = 'Stephen' or Agent = 'Alex', 'North', 'South')

Not applicable

Re: Grouping calculated dimensions

Thanks. It's a really tedious process because in the real data I have like 40 text values for conditions and in other datasets the number of conditions go up to +200. Thumb up but I'd appreciate it if there is an easier way to do this...

ramoncova06
Valued Contributor III

Re: Grouping calculated dimensions

you could always try with an applymap but that would be a backend script change, if you have another way to identify that is not at that granular level, you might be able to do a front end expression