# Qlik Sense App Development

New Contributor

## Month Sales share of Quarter in %

Hello

I have an app where I need to find the month share in % of the quarter.

So sales within month Jan, Feb, Mar would be 100% of first quarter - this needs to be shown on a bar chart for each month.

How do I calculate this?

BR

1 Solution

Accepted Solutions
Contributor III

## Re: Month Sales share of Quarter in %

Hi KML,

First, you need to create a quarterYear and monthYear fileds in your script and use them with an aggr function to calculate the total value for each quarterYear value.

A sample qvf is attached. You can check it out.

Hope it helps,

3 Replies
New Contributor

## Re: Month Sales share of Quarter in %

Hope this helps understand what I would like to have.

Currently this is done with a measure for each month, with a different formular in each: =if(OppMonth = 'Jan', Sum(SalesEUR))/ Sum(total if(OppQuarter = 'Q1',SalesEUR))

But I would like the bar to contain the last two year with each year having a different color.

As you see below, procentage from Jan + Feb + Mar is 100% and the same for other quarters.

Contributor III

## Re: Month Sales share of Quarter in %

Hi KML,

First, you need to create a quarterYear and monthYear fileds in your script and use them with an aggr function to calculate the total value for each quarterYear value.

A sample qvf is attached. You can check it out.

Hope it helps,

New Contributor

## Re: Month Sales share of Quarter in %

Worked perfect, thanks.