質問

I'm in this situation. I have a cube that has data aggregated by day. This cube has a dimension with hierarchy (year-> month-> day). in this hierarchy are visible every day for the last 4 months.

my problem is counting the days selected, because I need to do calculations based on the days observed (on a pivot).

example: There are data for the day 11/11/2013 (amount orders), but in the hierarchy I select values from 10.11.2013 to 20.11.2013 ..

how do I calculate (amount orders) / 11?

11 is the number of days 10-20.

役に立ちましたか?

解決

See my answer at MDX average fact items count by time dimension.

Having the day count as a measure in the cube would automatically apply all filters etc. without you having to take care of it.

他のヒント

You can use the Count() function to calculate the number of members in a set. Your set can consist of a range of dates if you use a colon between start and end date. Something like this:

Count({[Date].[Day].&[2013]&[11]&[10] : [Date].[Day].&[2013]&[11]&[20]})
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top