Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use set analysis to work out sales as a % of total sales for a selection (region) compared to total sales (country) within a selected year by age group.
With age group as my dimension, I have used the following expresion to calculate sales for the selection -
SUM(sales)/SUM(TOTAL(sales))
I have been trying to use set analysis to compare this with sales as a % of total sales for the country. I have used the following expression -
SUM({1}sales)/SUM({1}TOTAL sales)
Unfortnunately, the country % isnt showing the correct value. I think it might be excluding the selction 'Year' and working out sales as a % of total sales for all years.
I would be grateful for any advice.
Thanks
Greg
Please see attachment
Can you please post the sample application and data?
Sorry, I don't know how to post the sample application and data.
I have copied the straight table below -
I haven't selected a region here. All I have selected is the year. Therefore, the selection sales is the Scotland total. However, I think the expression for Scotland sales is ignoring my selection and showing the sales for all years.
SUM({1}sales)/SUM({1}TOTAL sales)
This expression will definitely ignore your selection. Set Identifier 1 ignores all the selection and gives result for entire data. Click on Use advance editor and attach your files
have you use Year= in your set analysis in scotland sales column if yes then remove it
and can you tell me code that you used in your last two column of straight table?
anant
have you use Year= in your set analysis in scotland sales column if yes then remove it
and can you tell me code that you used in your last two column of straight table?
anant
Try to use the $ instead of the 1 in the set analysis. Then you should take the selected values into account...
Please see attachment
Thankyou, thankyou, thankyou Anna. This worked beautifully.
Hi Anna.
Sorry to bother you again. Do you know if I can ignore other fields (in addition to region) in the following expresion. I would like it to ignore when someone selects a college within a region too.
Sum( {$<region = >} Sales) I would like it to ignore when someone selects a college within a region too.