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: 
Anonymous
Not applicable

Region Wise share

Dear All,

I have a chart in which i show brand wise share  .  When no Region is Selected it shows at All India Level which is correct as per below.

       

Dimension Expression :=if(getselectedCount(Region)>0,Region,'All India')

Expression Used:   

=sum({<LinkCommonDate={">=$(vLast2MonthMinDate)<=$(vLast2MonthMaxDate)" },Year=,Month= >}$(vMeasureSales))/

   Sum(TOTAL {<LinkCommonDate={">=$(vLast2MonthMinDate)<=$(vLast2MonthMaxDate)"},CompetitorName=,Year=,Month=>}$(vMeasureSales))

RegionBrandDealer CountJul17Aug17Sep17Week38Week37Week36Week35JulAugSep
All India23319100.0%100.0%100.0%100.0%100.0%100.0%100.0%0.0%0.0%0.0%
All IndiaSAMSUNG2322552.0%55.5%58.8%61.2%56.9%58.9%58.2%3.2%3.5%3.3%
All IndiaVIVO2117713.2%11.4%12.3%12.7%13.9%11.0%10.9%-0.4%-1.8%0.9%
All IndiaOTHERS2117712.2%10.4%9.4%8.4%9.5%10.0%9.8%0.8%-1.8%-0.9%
All IndiaOPPO2117711.6%10.2%8.6%8.0%8.5%8.7%9.2%-1.0%-1.4%-1.6%
All IndiaAPPLE211775.1%5.1%3.7%3.3%3.7%3.8%4.3%-1.7%0.0%-1.4%
All IndiaGIONEE211773.2%2.9%2.5%2.2%2.5%2.6%2.7%-0.5%-0.3%-0.4%
All IndiaMICROMAX211771.3%1.4%1.2%1.0%1.3%1.4%1.3%0.0%0.0%-0.1%
All IndiaLAVA01.1%0.3%0.0%0.0%0.0%0.0%0.0%-0.1%-0.8%-0.3%
All IndiaLYF211770.2%0.2%0.1%0.1%0.1%0.1%0.1%-0.2%0.0%0.0%
All IndiaHTC00.2%0.0%0.0%0.0%0.0%0.0%0.0%-0.1%-0.1%0.0%
All IndiaXIAOMI211770.0%2.8%3.3%3.1%3.5%3.4%3.4%0.0%2.8%0.5%

Now i want my expression to show Region wise contribution when i drill down on Region :

I want  Like below

RegionBrandDealer CountJul17Aug17Sep17Week38Week37Week36Week35JulAugSep
EAST 1SAMSUNG259553.0%56.9%59.7%60.2%58.9%60.3%59.2%2.4%3.9%2.8%
EAST 1VIVO236613.1%10.4%10.7%11.5%11.3%9.8%10.0%-0.3%-2.7%0.3%
EAST 1OTHERS236611.2%11.3%11.2%10.6%11.0%11.9%11.6%0.3%0.1%-0.1%
EAST 1OPPO236610.8%8.8%7.5%7.6%7.6%7.0%7.6%-1.0%-2.0%-1.3%
EAST 1GIONEE23666.0%5.7%5.0%4.8%4.9%5.1%5.3%-0.8%-0.4%-0.7%
EAST 1APPLE23662.4%2.4%1.5%1.2%1.6%1.5%1.7%-0.4%0.0%-0.9%
EAST 1MICROMAX23662.1%2.2%2.1%1.9%2.1%2.3%2.3%0.0%0.1%-0.1%
EAST 1LAVA01.0%0.3%0.0%0.0%0.0%0.0%0.0%0.0%-0.7%-0.3%
EAST 1HTC00.2%0.0%0.0%0.0%0.0%0.0%0.0%-0.1%-0.1%0.0%
EAST 1LYF23660.1%0.1%0.1%0.1%0.1%0.1%0.1%-0.1%0.0%0.0%
EAST 1XIAOMI23660.0%1.9%2.3%2.2%2.6%2.0%2.3%0.0%1.9%0.3%
EAST 2SAMSUNG249458.4%64.3%64.0%65.3%62.8%63.9%65.4%2.0%5.9%-0.3%
EAST 2OPPO230211.1%8.9%8.2%7.9%8.1%8.3%8.3%-0.9%-2.2%-0.7%
EAST 2VIVO230211.0%9.0%10.3%10.8%11.3%9.3%8.9%-0.4%-2.1%1.3%
EAST 2OTHERS230210.4%9.4%9.5%9.0%9.7%9.9%9.3%1.4%-0.9%0.1%
EAST 2GIONEE23023.9%3.3%3.0%2.8%3.0%3.1%3.1%-0.5%-0.6%-0.3%
EAST 2MICROMAX23021.9%1.8%1.6%1.3%1.6%1.7%1.7%-0.1%-0.1%-0.3%
EAST 2APPLE23021.8%1.4%1.5%1.2%1.5%1.7%1.5%-0.8%-0.3%0.0%
EAST 2LAVA01.1%0.3%0.0%0.0%0.0%0.0%0.0%-0.1%-0.8%-0.3%
EAST 2LYF23020.3%0.2%0.2%0.1%0.2%0.2%0.2%-0.4%-0.1%0.0%
EAST 2HTC00.1%0.0%0.0%0.0%0.0%0.0%0.0%0.0%-0.1%0.0%
EAST 2XIAOMI23020.0%1.3%1.8%1.6%1.8%1.9%1.7%0.0%1.3%0.5%

But what i m getting is Example:  Bifercation of 52.0 % of Samsung from All India( chart 1st)  .In East 1:- 4.2, East 2:- 4.3  so on which is wrong .

Please help .

       

RegionBrandDealer CountJul17Aug17Sep17Week38Week37Week36Week35JulAugSep
--23319100.0%100.0%100.0%100.0%100.0%100.0%100.0%0.0%0.0%0.0%
EAST 2SAMSUNG24944.3%4.4%4.0%4.0%3.9%4.1%4.4%1.0%0.1%-0.3%
NORTH 3SAMSUNG26805.9%6.1%5.7%5.6%5.1%6.1%6.4%-0.2%0.2%-0.3%
WEST 4SAMSUNG13462.4%3.0%2.8%2.8%2.5%2.8%2.9%0.8%0.6%-0.2%
NORTH 2SAMSUNG19243.6%4.0%3.9%4.5%3.4%3.8%4.0%-0.2%0.3%-0.1%
NORTH 1SAMSUNG20374.5%4.9%4.9%5.4%4.6%4.6%4.7%-0.2%0.4%-0.1%
NORTH 4SAMSUNG14733.7%3.9%4.2%4.3%4.0%4.2%4.3%0.2%0.2%0.2%
WEST 2SAMSUNG16003.9%4.6%5.0%6.1%4.9%4.3%4.1%0.5%0.7%0.2%
WEST 1SAMSUNG29398.8%9.3%9.7%9.9%9.9%9.3%9.0%0.1%0.5%0.3%
SOUTH 3SAMSUNG13443.0%3.2%3.5%3.8%3.4%3.4%3.4%0.3%0.3%0.3%
SOUTH 2SAMSUNG12953.5%3.8%4.0%4.1%3.9%4.1%3.9%0.1%0.3%0.3%
EAST 1SAMSUNG25954.2%4.7%5.7%6.0%5.8%5.5%5.3%0.3%0.5%1.0%
SOUTH 4SAMSUNG5421.3%1.8%2.6%2.0%2.2%3.0%3.1%0.1%0.4%1.1%
SOUTH 1SAMSUNG9562.9%1.9%3.1%2.7%3.1%3.8%2.8%0.3%-1.0%1.1%
1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=sum({<LinkCommonDate={">=$(vLast2MonthMinDate)<=$(vLast2MonthMaxDate)" },Year=,Month= >}$(vMeasureSales))/

   Sum(TOTAL<Region> {<LinkCommonDate={">=$(vLast2MonthMinDate)<=$(vLast2MonthMaxDate)"},CompetitorName=,Year=,Month=>}$(vMeasureSales))

View solution in original post

2 Replies
swuehl
MVP
MVP

Try

=sum({<LinkCommonDate={">=$(vLast2MonthMinDate)<=$(vLast2MonthMaxDate)" },Year=,Month= >}$(vMeasureSales))/

   Sum(TOTAL<Region> {<LinkCommonDate={">=$(vLast2MonthMinDate)<=$(vLast2MonthMaxDate)"},CompetitorName=,Year=,Month=>}$(vMeasureSales))

Anonymous
Not applicable
Author

Thanks , i m checking the same . Also please tell :-

when i drill down on region i get all regions but in tolat row ,Column Region  is blank when no region is selected . When no region is selected then also i need ALL INDIA after drill down

dimension Expression:-

if(getselectedCount(Region)>0,Region,'All India')