Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
beginner91
New Contributor III

pie chart if count words

hello all,

i have a excel file with dimension: Phase and want a pie chart.  I want to show all 3 together like:

if(Phase='hello' and 'hi' and 'hey', 'hello')

i need some help at the expression. how can i show all 3 together in one hello??

thanks.

 

Tags (5)
Labels (5)
5 Replies
Vegar
Honored Contributor

Re: pie chart if count words

I'm not completely sure I understand your problem, but I'll give it a try.

You want the values hello, hi and hey to be handled as hello? You do not want any hi or hey to be found in your application data?

If yes try using applymap()

PhaseMap:
Mapping load * inline [
PhaseOrig, phaseNew
hi, Hello
hey, Hello
hello, Hello
];

LOAD
Apply map( 'PhaseMap', Phase, Phase) as Phase
FROM
ExcelFile.xlsx
;
Please ekskuse my Norglish and Swenglish typos.
beginner91
New Contributor III

Re: pie chart if count words

i have something like this:

phase

a

b

hello

hi

hey

and i want to show a pie chart with: a,b, and (hello,hi,hey) as hello

 

pradosh_thakur
Honored Contributor II

Re: pie chart if count words

Try below as dimesnion

 

If(Phase='hi' or Phase='hello' or Phase='hey','hello',Phase)

 

Learning never stops.
pradosh_thakur
Honored Contributor II

Re: pie chart if count words

or this

pick(match(Phase,'hi','hello','hey')+1,Phase,'hello','hello','hello')
Learning never stops.
Vegar
Honored Contributor

Re: pie chart if count words

//a mapping table used to convert hi, hey into hello.
// you may expand this to other convertions as well

PhaseMap:
MAPPING load * inline [
PhaseOrig, phaseNew
hi, Hello
hey, Hello
hello, Hello
];

LOAD
Apply map( 'PhaseMap', Phase, Phase) as Phase,
1 as #count
FROM
ExcelFile.xlsx
;

In your chart put "Phase" as your dimension and =sum(#count) as your expression.
Please ekskuse my Norglish and Swenglish typos.