kubaf
asked on
How to sum over time period in MDX
I got time dimension based on DateTime column in fact table. Now i'am trying to build MDX query to sum fact rows on custom time periods. For example:
SELECT [Events Count] ON Columns, [20 seconds time periods] on Rows FROM [Common]
Result i expect:
Events Count
2008-10-29 17:22:00 1
2008-10-29 17:22:20 2
2008-10-29 17:22:40 1
2008-10-29 17:23:00 56
How to build MDX query?
regards
Kuba F.
SELECT [Events Count] ON Columns, [20 seconds time periods] on Rows FROM [Common]
Result i expect:
Events Count
2008-10-29 17:22:00 1
2008-10-29 17:22:20 2
2008-10-29 17:22:40 1
2008-10-29 17:23:00 56
How to build MDX query?
regards
Kuba F.
Use a new dimension with 60 members - one for each second. Map this dimension to your fact table. Then you can construct 3 custom sets e.g. {Second.[0]:Second.[19]}, {Second.[20]:Second.[39]}, {Second.[40]:Second.[59]} and put them on the row axes.
ASKER
srnar can you write sample MDX with sets? I'am kinda new in analysis services.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.