
2. Re: Custom Geographic Regions and Calculating Percentages By Region
Luis de la Torre Jun 30, 2015 10:47 AM (in response to Kenny Lee)I don't know enough to answer your question, or what exactly your answer means, but I'll try to give more useful info.
In the attached workbook (from the answer Re: Data at Area level (different than the provinces level) ) the measure "LOD Region or State" is:
IF [State or Region]='Region' THEN
{FIXED [Region] : SUM([Sales]) } ELSE
{FIXED [State] : SUM([Sales]) } END
When you say to "do a SUM([Sales]) / SUM {Fixed Region: Sum([Sales])})", does that mean to change the LOD to that? There is also in the Marks section the calculation SUM([LOD Region or State]). I'm not sure if I would need to change that.

Region and States.twbx 1.2 MB


3. Re: Custom Geographic Regions and Calculating Percentages By Region
Kenny Lee Jun 30, 2015 7:38 PM (in response to Luis de la Torre)1 of 1 people found this helpfulHi Luis,
It depends on what you want your numerator and denominator to be.
For instance in US Superstore, your denominator could always be the total of ALL sales. Your calculations would then be for instance:
 Region % = sum( {fixed Region:Sum(Sales)} ) / sum( {Sum(Sales)} )
This gives the sum of sales at each region divided by the total sales. The curly brackets around sum(sales) would total all sales regardless of detail.
 State % = sum( {fixed State: Sum(Sales)} )/ sum( {Sum(Sales)} )
This gives the sum of sales of each state divided by the total sales.
Does this clarify?
Kenny

4. Re: Custom Geographic Regions and Calculating Percentages By Region
Luis de la Torre Jul 1, 2015 9:30 AM (in response to Kenny Lee)Yes. Great. Thank you!