# New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

## Dimensions in Pie Chart

Hello.

I have a pie chart in QV 10 where I would like to show the information about the percent of sales in one Year comparing to the Year before and with the next Year, meaning I would have something like:

Year Selected: 2011

The pie chart would 3 slices with something like:

2010 - 25%

2011 - 34%

2012 - 41%

Is this possible? How can I achieve this?

1 Solution

Accepted Solutions
MVP

## Re: Dimensions in Pie Chart

If your year is a 4-digit number, I believe this:

Dimension  = if(Year>=\$(=max(Year)-1) and Year<=\$(=max(Year)+1),Year)
Expression = sum({<Year=,Month=,etc. for all calendar fields>} Sales)
checkmark "values on data points" on expressions tab
checkmark "relative" on expressions tab

If your year is a date formatted as YYYY (which is what I usually do):

3 Replies
Not applicable

## Re: Dimensions in Pie Chart

In addition, I have a report with that pie chart but I can't get it to print the % next to the slices as I can see in the screen... is that possible as well?

Thanks

MVP

## Re: Dimensions in Pie Chart

If your year is a 4-digit number, I believe this:

Dimension  = if(Year>=\$(=max(Year)-1) and Year<=\$(=max(Year)+1),Year)
Expression = sum({<Year=,Month=,etc. for all calendar fields>} Sales)
checkmark "values on data points" on expressions tab
checkmark "relative" on expressions tab

If your year is a date formatted as YYYY (which is what I usually do):