# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Share of Total

Hello,

I have Same Question I had day before and I cant come up to its solution  so ask your help Again.

I need to calculate market Share of stations Within the district Where this stations is.  there is also other stations in this district so I need

to know what share does ''Neogas''s  stations have.

(Sum({<Owner={'NeoGas'}, YearMonthMY = {'>=\$(vStartDate)<=\$(vEndDate)'} >}Volume)

/

sum( {<District, YearMonthMY = {'>=\$(vStartDate)<=\$(vEndDate)'} >}  total Volume))

this is the formula that I use but it is not working and can you please help me or at least tell me what does this formula do?

7 Replies
MVP

## Re: Share of Total

Where are you using this expression? In a chart or text box object?

New Contributor III

## Re: Share of Total

In scatter plot chart. I Think I Did it

(sum({<Owner = {'Neogas'},YearMonthMY = {'>=\$(vStartDate)<=\$(vEndDate)'} >}Volume)

/

sum(aggr( sum({<YearMonthMY = {'>=\$(vStartDate)<=\$(vEndDate)'}>}Total <District> Volume),District, StationName)))

-

(sum({<Owner = {'Neogas'},YearMonthMY = {'>=\$(v2StartDate)<=\$(v2EndDate)'} >}Volume)

/

sum(aggr( sum({<YearMonthMY = {'>=\$(v2StartDate)<=\$(v2EndDate)'}>}Total <District> Volume),District, StationName))

)

It Looks like correct.

As long as you are here I ask you one more Question Please, How it is possible to make parallel dimension of date so I Use date Field and not that many variables?

MVP

## Re: Share of Total

 As long as you are here I ask you one more Question Please, How it is possible to make parallel dimension of date so I Use date Field and not that many variables?

Valued Contributor

## Re: Share of Total

Are you talking about a Master calendar?

Creating A Master Calendar

New Contributor III

## Re: Share of Total

To load date as two different fields and Use in Expression to compare different Periods. I need to compare  dates I select To each other  and for that I need Two date Field but both must be connected to my data  like parallel dimension or some thing like this.

Valued Contributor

## Re: Share of Total

Please provide an example of specific comparison with data and outcomes.

Set Analysis may provide a way to accomplish it.

New Contributor III

## Re: Share of Total

This is Expression that I use. I have 4 variables and user should have write that variables to compare this periods.

and I wonder If there is a chance I can do this with two date fields to they don;t have to write dates but select from filter.

Sum(Aggr(If(Rank(Sum(Volume)) <= 10,

(Sum({<Owner,YearMonthMY = {'>=\$(vStartDate)<=\$(vEndDate)'}>}Volume)

/

Sum({<YearMonthMY = {'>=\$(vStartDate)<=\$(vEndDate)'}>}Total Volume)

)

-

(Sum({<Owner,YearMonthMY = {'>=\$(v2StartDate)<=\$(v2EndDate)'}>}Volume)

/

Sum({<YearMonthMY = {'>=\$(v2StartDate)<=\$(v2EndDate)'}>}Total Volume)

)

)

, Owner))