Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
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.

 

Labels (5)
5 Replies
Highlighted
Partner
Partner

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
;
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor III
Contributor III

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

 

Highlighted
Master II
Master II

Try below as dimesnion

 

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

 

Learning never stops.
Highlighted
Master II
Master II

or this

pick(match(Phase,'hi','hello','hey')+1,Phase,'hello','hello','hello')
Learning never stops.
Highlighted
Partner
Partner

//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.
Plees ekskuse my Swenglish and or Norweglish spelling misstakes