Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Calculation Dimension Last 30 Days

$
0
0

I'm using Marco Russo's DateTool Dimension example and running into issues trying to create a "Last 30 Days" calculation. Below is what I'm using. It works at the "Date" level in the hierarchy, but any higher up and it's aggregating incorrectly. Any thoughts?

( [Date Calculation].[Aggregation].[Last 30 Days] ) 
          = Aggregate(
                     { [Date Calculation].[Aggregation].DefaultMember } *
                     { ParallelPeriod(
                                       [Accounting Date].[Year-Quarter-Month-Date].[Month],
                                       1,
                                       [Accounting Date].[Year-Quarter-Month-Date]
                       ) : [Accounting Date].[Year-Quarter-Month-Date].CurrentMember
                     } );


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>