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: 
mariamovasheli
Contributor III
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
sunny_talwar

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

mariamovasheli
Contributor III
Contributor III
Author

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?

sunny_talwar

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
Specialist II
Specialist II

Are you talking about a Master calendar?

Creating A Master Calendar

mariamovasheli
Contributor III
Contributor III
Author

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
Specialist II
Specialist II

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

Set Analysis may provide a way to accomplish it.

mariamovasheli
Contributor III
Contributor III
Author

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