Showing posts with label dimension. Show all posts
Showing posts with label dimension. Show all posts

Monday, March 12, 2012

Problem while giving Quarter function

Sir,

When I am giving the command like Quarter(DateOfOrder) in new named dimension expression column , one error is showing ' Quarter is not recognised built in function ' . Please help me to find out the quarter of Date of Order column..

Thanks in advance..

Regards

Polachan

You need to use an expression such as

DATEPART(quarter,DateOfOrder)

To get the result you require

|||

Dear Sir,

Thanks a lot

Sir Please can u give me a help for the following problem while deployment of the project

Error 4

When I am deploying the project I got the following error. Please help me sir


Errors in the OLAP storage engine: An error occurred while processing the 'Product Tran Header' partition of the 'Product Tran Header' measure group for the 'Test' cube from the productreport database. 0 0

I done the following steps

1. added new measure selecting new source table

2. selected one column dateoforder

3. Add new dimension as without using data source

4. selected server time dimension

5. Selected Year/Month/Quarter/date

6 Selected fiscal year

7.Selected dimension usage in cube desgn

8. selected time dimension and selected regular relation, Granulary attribute as Date

9. Measure group table 'Product tran header' new measure group

10 selected measure group column as dateoforder.

after that while deploying the above mentioned error will come

Please help

|||As far as I know, I answered your question. Why have you answered that with a completely different question ? |||

Sir,

I wan to know how to give relationship Servertime Dimension with the column in the table DateOfOreder. When I am giving this with the mentioned step I got the error. Please help me sir...

Friday, March 9, 2012

Problem when creating a new named calculation

I have a Customer dimension in my model, and now I want to count the # unique customers in one of my fact tables.

Therefore I created a new named calculation in the fact table which does a count distinct of the customerkey in the fact table.

And when I try to add a new report model i get the following error message, even when I don't select anything in the Select report model generation rules screen:

TITLE: Microsoft Visual Studio

An error occurred while executing a command.
Message: Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
Command:
SELECT
COUNT([DEPARTURE]),
COUNT(DISTINCT [DEPARTURE]),
COUNT((SELECT
DISTINCT(
COUNT(CLIENTKEY)) AS Number_of_Persons
FROM
FCT_TABLE AS FCT_TABLE)),
COUNT(DISTINCT (SELECT
DISTINCT(
COUNT(CLIENTKEY)) AS Number_of_Persons FROM
FCT_TABLE
FCT_TABLE)),
COUNT(Arrival),
COUNT(DISTINCT Arrival)
FROM [dbo].[FCT_TABLE] t


BUTTONS:

OK

What should I do?

As I understand you have defined one of named calculations as

(SELECT DISTINCT(COUNT(CLIENTKEY)) AS Number_of_Persons
FROM
FCT_TABLE AS FCT_TABLE)

Yes, this named calculation will not work in some cases. But it will work if you push it into a named query. Redefine you FCT_TABLE table in DSV editor as a named query:

SELECT
*,
(SELECT DISTINCT(COUNT(CLIENTKEY)) FROM FCT_TABLE) AS Number_of_Persons
FROM FCT_TABLE