Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
mariamovasheli
Contributor III
Contributor III

Aggregation Of Different Collumns

Hello,

I need to Calculate market share of certain station in a district Where it is. So I should Divide station's volume to volume of district where it is.

This is my formula but it doesn't Work Can you Please help me


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

/

AGGR(Sum({<YearMonthMY = {'>=$(vStartDate)<=$(vEndDate)'}>}Total Volume),District)

6 Replies
agigliotti

what chart object are you using to show it ?

are YearMonthMY field and vStartDate and vEndDate variables in the same format ?

try to show them in a text object to be sure about it .

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
mariamovasheli
Contributor III
Contributor III
Author

AGGR(Sum({<Owner={'NeoGas'}, YearMonthMY = {'>=$(201801)<=$(201805)'}>}Volume),StationName)

/

AGGR(Sum({<YearMonthMY = {'>=$(201801)<=$(201805)'}>}Total Volume),District)


I use skater plot and my problem is not date filed this works but I cant calculate market Share of this particular station Within the district it is situated.

miskin_m
Partner - Creator
Partner - Creator

Hi Mariam,

You can try below expression

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

/

sum(AGGR(Sum({<YearMonthMY = {'>=$(vStartDate)<=$(vEndDate)'}>}Total Volume),District))


My suggestion is please try one expression at a time and see where exactly this break. If this wont work can you share the sample app


Regards.

agigliotti

let's try with this:

AGGR(Sum({<Owner={'NeoGas'}, YearMonthMY = {">=201801<=201805"}>}Volume),StationName)

/

AGGR(Sum({<YearMonthMY = {">=201801<=201805"}>}Total Volume),District)


how can you say the value you get is wrong?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
mariamovasheli
Contributor III
Contributor III
Author

Firs part Works perfectly but second part with first one not working.

miskin_m
Partner - Creator
Partner - Creator

will need a sample app to work on the expression