Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mariamovasheli
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
MVP

Re: Share of Total

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

mariamovasheli
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
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?

I don't think I follow your question

dwforest
Valued Contributor

Re: Share of Total

Are you talking about a Master calendar?

Creating A Master Calendar

mariamovasheli
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.

dwforest
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.

mariamovasheli
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.

period.JPG

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))