Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

YoY Market Share Calculation in qlik sense

hi all,

I am calculating market share formula using dimension Company & fiscal year

Expression:

(((SUM({$<COMP=,FiscalYear={$(=max(FiscalYear))}>} Y2Sale))/$(vvTotalY2Sale))*100)

Variable Declared

vvTotalY2Sale is variable : SUM({$<FiscalYear={$(=max(FiscalYear))}>} TOTAL [Y2Sale])  (total of all Compaies)

I am getting output attached which is correct for one fiscal year 2018 , in my data I have data from 2011. How to show this all fiscal year market share like 2011.... to 2018 companywise?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
7 Replies
sunny_talwar

Remove the set analysis on Fiscal Year as this is what is restricting the expression to show 2018 only

(((SUM({$<COMP>} Y2Sale))/$(vvTotalY2Sale))*100)


Variable Declared

vvTotalY2Sale is variable : SUM( TOTAL <[FiscalYear]> [Y2Sale])

vikasmahajan
Author

Thanks Sunny

Hey Sunny i declared  vY2SaleYearly =SUM( TOTAL <[FiscalYear]> [Y2Sale])

used expression : (((SUM({$<COMP>} Y2Sale))/$(vY2SaleYearly))*100)  as you suggests

Dimension : FiscalYear & Comp

default selected : FY17-18

Still i am not able to get yearly trend in chart I wanted to calculate market share for each fiscal year like

         2011  2012   2013 ....  2018 & Market share of each company

thanks

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

Have you made selection in a FiscalYear? Do you want me be deselect FiscalYear or ignore selection in FiscalYear in your expressions?

vikasmahajan
Author

I wanted to ignore fiscalyear in expression default  fiscal year will be selected by user.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

Then try this

(((SUM({$<COMP, [FiscalYear]>} Y2Sale))/$(vvTotalY2Sale))*100)


Variable Declared

vvTotalY2Sale is variable : SUM( TOTAL <[FiscalYear]> {<[FiscalYear]>} [Y2Sale])

vikasmahajan
Author

Sunny tried this as well  I am getting only current fin year MS

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

Is FiscalYear different from FinancialYear? You seem to be making selection in FinancialYear... may be try this

(((SUM({$<COMP, [FiscalYear], FinancialYear>} Y2Sale))/$(vvTotalY2Sale))*100)


Variable Declared

vvTotalY2Sale is variable : SUM( TOTAL <[FiscalYear]> {<[FiscalYear], FinancialYear>} [Y2Sale])