RE: Problem when using DateDiff and slicing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Henrik,
The issue of your sample 3 was actually caused by the CurrentMember.
Apparently the iteration should happen on Employee level, though you use
the organization slice, actually the statistics are for all employees in
the slice cells. For your requirement, it is not easy to implement if you
do not create a new cube or a new measure group. The reason is that you are
trying to perform an aggregation based on multiple dimension analysis,
however you do not have matched measures in your underlying fact table. I
recommend that you create a dynamic view in your database, for example, you
can name it as FactEmployeeServiceLenView:
CREATE VIEW FactEmployeeServiceLenView
as
SELECT DimEmployee.EmployeeKey,
DimOrganization.OrgnizationKey,DateDiff(year,DimEmployee.[HireDate],getdate(
)) as ServiceLength
FROM DimEmployee JOIN DimOrganization ON DimEmployee.OrgnizationKey =
DimOrganization .OrgnizationKey

After that, create a new cube, add the view into your data source view, and
the related dimensions DimEmployee and DimOrganization. After that, you can
process and deploy the cube and run the MDX query as following:
SELECT [Measures].[Service Length] ON COLUMNS,
[Organization].[Organization] ON ROWS
FROM [The cube name]

If you do not want to create a new cube, you can also create a measure
group to your existing cube. You still need to add the view to your data
source view and define the relationships among the new measure group and
the dimensions employee and organization on the Dimension Usage pane. After
process and deploy your cube, you can run the same MDX query as the above
statement.

If you have any other questions or concerns, please feel free to let me
know. It is my pleasure to be of assistance.

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================



.



Relevant Pages

  • Re: Problem when using DateDiff and slicing
    ... do not create a new cube or a new measure group. ... the dimensions employee and organization on the Dimension Usage pane. ... Microsoft Online Community Support ... or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.sqlserver.olap)
  • RE: Handling A Changing Status/State Reporting
    ... What did you expect to get from the OLAP cube? ... I agree that you create a Time Dimension for your cube. ... Microsoft Online Community Support ... or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.sqlserver.olap)
  • x3 Technical Support Consultants
    ... On behalf of our client who is the worldwide leader of employee ... Internet management solutions we are recruiting for 3 Technical ... Support Consultant's to work in their Chertsey offices in Surrey. ... LDAP Directory Servers ...
    (uk.jobs.offered)
  • Re: Combining Two Cubes with Different Time Periods
    ... Order cube is in the past. ... and Inner join (which would exclude the forecast). ... My original thought was to create Parent-Child dimension for every ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.olap)
  • Re: Shoesmith
    ... Brown for his bullying behaviour. ... He doesn't see it as bullying to single out a council employee, ... you have to give warnings, you have to offer support, you have to offer ... passing the buck and the refusal to resign. ...
    (uk.legal)