Syntax for named calculation

  • I have a column in one of my dimensions called fiscal quarter. The data looks like FY2008-Q1. I want to create an additional column in the dimension called Quarter. I am trying to create a Named Calculation but i am getting no data returned.

    I have tried all sorts of different syntaxes, which have been accepted by MSAS but never any data.

    Substring(Fiscal_Quarter,8,2)

    Any ideas??

  • Just a heads up, this isn't an answer, more of a question :hehe:

    Is your 'calendar' quarter the same as your fiscal quarter? And if not, I'd prob lean towards introducing another field in my Time dim that caters to the calendar time components.

    Steve.

  • I am trying to populate Calendar with 2 characters from Fiscal_Calendar.

    Fiscal_Calendar Calendar

    FY2008-Q1 Q1

  • I fully understood that - hence my question. I guess I didn't see much point in adding a second Quarter (or other 'calendar') time component *if it's the same as the fiscal*. But, it would be a little odd to have a calendar quarter the same as a fiscal (ie often the same 3 months but possibly a different quarter number. so in Australia, you'll often have Fiscal Q1 == Jul + Aug + Sept == Calendar Q3). So simply trimming the text of 'FY2008' out of a name does *not* make it in to a calendar quarter.

    But like I said, if they're not the same thing, add a new field (or fields, one for yr, qtr possibly even month) to your time dimension table and use this in your dim.

    If you're insisting that they are the same thing, then why not modify your view rather than the DSV as your syntax wold definitely be valid there (though it seems valid to me for the DSV too).

    Steve.

  • It is purely for display purposes, some prefer this to that.

    I could modify the ETL to add a new column to the source table, or create a view on top of the source table and use that.

    I was just wondering if a named calculation could handle this quickly.

  • Ok, gotcah. A named calc should definitely be able to handle it, not sure why it's not happy with what you've entered. Have you tried testing (ie viewing data) by right clicking onthat table inthe DSV? If the grid there doesn't return you values then you've got issues.

    Steve.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply