Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ratier
Contributor III
Contributor III

Help with Cyclic Groups and Pie Chart visualization

Hello, how are you? I'd like some help with a dynamic visualization of my date. I have a table like this in the photo and i'm trying to create Cyclic Groups to show this data as a pie chart. I want the user to be able to select a category, say "REASONS 1 TO 2", and he'll be able to se the percentage of "REASON 1"  of the total "REASON 1" + "REASON 2". The same thing goes to the other reasons. How do I do that in Qlik Sense with a table like this one?

QLIK HELP.png

Labels (5)
1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

1 transpose your data into the following structure from a pivot view

Category, Reason, Count

using https://help.qlik.com/en-US/sense/November2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...

2. bucket you data into Reason Groups.

example If(Match(Reason, 'Reason 1','Reason 2')>0, 'REASON 1 TO 2', 'REASON 3 TO 5') as "Reason Groups"

In the visuals you could either

1. create a drill down Master Dimension using Reason Group > Reason for your pie chart

2. create a Alternate Dimension using Reason Group and Reason for your pie chart to flip between

3. create a Reason pie chart and use a trellis container dimension set to Reason Group.

 

 

 

 

View solution in original post

6 Replies
ogster1974
Partner - Master II
Partner - Master II

1 transpose your data into the following structure from a pivot view

Category, Reason, Count

using https://help.qlik.com/en-US/sense/November2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...

2. bucket you data into Reason Groups.

example If(Match(Reason, 'Reason 1','Reason 2')>0, 'REASON 1 TO 2', 'REASON 3 TO 5') as "Reason Groups"

In the visuals you could either

1. create a drill down Master Dimension using Reason Group > Reason for your pie chart

2. create a Alternate Dimension using Reason Group and Reason for your pie chart to flip between

3. create a Reason pie chart and use a trellis container dimension set to Reason Group.

 

 

 

 

Ratier
Contributor III
Contributor III
Author

I'm sorry but i'm new to Qlik Sense and i'm  finding it very difficult to understand. How do I do the item 2? 

ogster1974
Partner - Master II
Partner - Master II

do you have a sample of your data you can share?

you need to do it in the load script.

Ratier
Contributor III
Contributor III
Author

I'm currently using a excel spreadsheet to test the visualization. First I need to understand the second part of your advice since I can easy do the first in excel. So here's a samples of an already pivoted table. I'm trying to use it in Qlik to do the visualization.

ogster1974
Partner - Master II
Partner - Master II

LOAD
*,
If(Match(Reason, 'REASON 1','REASON 2')>0, 'REASON 1 TO 2', 'REASON 3 TO 5') as "Reason Groups"
;
LOAD
A AS Category,
"REASON 1" as Reason,
"28" AS "Count"
FROM [lib://Community:DataFiles/Pasta2.xlsx]
(ooxml, embedded labels, table is Planilha1);

will do your step 2.

you can then produce visuals like.

ogster1974_0-1675703069531.png

 

Ratier
Contributor III
Contributor III
Author

Got It! Thanks! 

I used only the following part and worked fine:

LOAD
*,
If(Match(Reason, 'REASON 1','REASON 2')>0, 'REASON 1 TO 2', 'REASON 3 TO 5') as "Reason Groups"
;

Now I'll study more about pivoting my table