Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Flipping Axis on Pie Chart?

I have a table with data similar to:

ObjectData1Data2Data3
Chair1055
Lamp15132
Basket8124
Shade19176
Book End18159

The problem is that I want it to show separate pie charts for Data1, 2 and 3 with a slice for each object, rather than the reverse, which is how it creates it now.

There is no "rotate axis" on pie charts, and I cannot create a duplicate of the table with the fields rotated around because of the sheer volume of data I am dealing with.

Suggestions (or did I miss some setting that can do this)?

It would be really nice if there was a standard "Rotate Axes" checkbox regardless of the type of chart you are displaying.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

One more idea:

you could use a calculated dimension:

=valuelist('Sales', 'Cost', 'Profit')

as first dimension, object as second and as 1 expression a check for valuelists type and getting the correct field.

See attached sample app.

This is only feasible, if you know your data fields...

Have a nice evening,

Stefan

View solution in original post

18 Replies
swuehl
MVP
MVP

If I use Object as dimension and Data1 as expression, I get slices for each object with Data1 values as expected.

Could you explain a bit more what your issue is or could you upload a sample app?

Not applicable
Author

Turn on trellis and what you get is a pie chart for each object with slices for Data1, Data2 and Data3.   I need it the other way around.

Not applicable
Author

blackhawk,

  This is a tough question. I didn't really notice this until I tried your example. I do not have an answer for you yet but I do have a suggestion if you are pressed for time.

You could group the different expressions together by using the "Group" button. That way, you can flip through each of the expressions (Data1,2,3) while maintaining the Object dimension. The chart would have the Circle group button in it.  Each pie slice would be one object.

I will let you know if I find a solution.

Not applicable
Author

Hmmmm.   Interesting...let me give it a whirl.

No I am not in a big rush, but I do thank you for being responsive.  

I love this community forum!!

swuehl
MVP
MVP

You could be a bit more chatty in describing what your are doing (trellis ok, 1 dimension = Object, 3 expressions =Data1,Data2,Data3, right?).

You don't need it the other way round, you need a dimension of Datatype (i.e. values Data1, Data2,Data3).

You should use a cross table to retrieve that from your data.

If your table is too big - well, you probably show aggregated data in the pie charts, don't you?

Build a aggregated table, convert it to crosstable.

Use Object and Datatype as Dimensions, activate Trelis.

One Expression = Data (derived by using crosstable).

Stefan

P.S.

If you have few Data columns, you might just layout the trellis on your own using separate pie chart objects.

johnw
Champion III
Champion III

If I do this:

dimension = Object
expression = Data1

Then I get a pie chart "for Data1... with a slice for each object".  Do this for each DataX, you have have what it appears you are asking for.  This seems like basic pie chart behavior, no "flipping axis" or anything, so I assume I'm misunderstanding the problem.  Is the problem that you have an unknown (ahead of time) number of DataX fields, so you can't just build one pie for each?  You need to somehow build a trellis chart for them instead?  If so, then I think Stefan is on the right track - use crosstable to convert the columns to rows, and use that new dimension in your chart.

Not applicable
Author

Sorry for not being "chatty" enough.   First time I have been called that!   

I thought the table would illustrate Object as dimensions and Data1-3 as expressions, but I should not have assumed it was immediately apparent.

I would normally use a crosstable, but the problem is that there are 20 million rows which go into it and selection criteria in other fields could limit the data and change the pie chart.   As it stands today, I am using 14GB of RAM, and would not like to make it double just for this.

As far as aggregated table, that is out too, unfortunately, because there are a lot of other selections (as I eluded to above) that can occur which filter the data out.  

What is interesting is there are various posts here and there about people trying to rotate the axes on various objects, it seems logical to have a simple "Flip Axes" on the result set which would enable this on any object, but then again, I haven't given it deep consideration to see what all the issues that brings up.   There are just times when it seems appropriate.

Thanks for your input.

Not applicable
Author

swuehl - That seems like an awful lot of work to come up with a pie chart. I don't like creating extra tables unless they are absolutely necessary

Sometimes, the data just doesn't lend itself to certain types of charts. You might have a vision for your app but it just won't be possible.

In this case, I think a bar chart with Object on the x-axis (dimension) and each "Data" item as a different colored bar would be perfect.Is it necessary to have a pie chart blackhawk?

Not applicable
Author

I also like the idea to create seperate pie charts and lay out the Trellis yourself