Using the Query Designer in VS2012 I'm creating a report about chickens.
I select my measure (Count of Chickens) and the Dimension (Farm).
I use the filter expression option to create a parameter for chicken colour, and only include chickens that are red, blue or green. This gives me something that looks a little like this:
Farm |Chicken Count
A |3
B |4
C |19
Now I want to show this count of chickens as a percentage of the total number of chickens that farm has. Something like this:
Farm |Chicken Count |Percentage of Total Chickens at Farm
A |3 |0.13
B |4 |1
C |19 |0.45
How can I create a calculated Member to show this last field?
I've tried
[Measures].[Chicken Count] / SUM(Axis(1), [Measures].[Chicken Count])
but that gives me the farms chicken count as a percentage of all the chickens at all the farms meeting the parameter.
The problem I'm facing is that I can't find a way to get all the chickens for the farm - ignoring the filter.
How can I do something like
[Measures].[Chicken Count] / SUM(non-filtered Chickens)?
Please let me know in comments if there is anything I can do to help explain this further. Please also assume (if it isn't already clear) that I have almost no knowledge of MDX.