Analysis :: Count Function Taking More Time To Get Count From Parent Child Dimension?

May 25, 2015

below data,

Countery
parentid
CustomerSkId
sales

A
29097
29097
10

A
29465
29465
30

A
30492
30492
40

[code]....
 
Output

Countery
parentCount

A
8

B
3

c
3

in my count function,my code look like,

 set buyerset as exists(dimcustomer.leval02.allmembers,custoertypeisRetailers,"Sales")
set saleset(buyerset)
set custdimensionfilter as {custdimensionmemb1,custdimensionmemb2,custdimensionmemb3,custdimensionmemb4}
set finalset as exists(salest,custdimensionfilter,"Sales")
Set ProdIP as dimproduct.dimproduct.prod1
set Othersset as (cyears,ProdIP)
(exists(([FINALSET],Othersset,dimension2.dimension2.item3),[DimCustomerBuyer].[ParentPostalCode].currentmember, "factsales")).count

it will take 12 to 15 min to execute.

View 3 Replies


ADVERTISEMENT

Analysis :: How Time Dimension Aggregate Parent Child In MDX

May 21, 2015

I have a parent child dimension. a time dimension i have year.

Assume,

ParentID ChildID sales Year

171 171 10 2014
171 172 200 2014
171 173 300 2014
171 172 44 2015

if I pass 2014 and 2015 in sub select  171 data is not coming in result. i i pass only 2014 in sub select i get value of only 2014. if I pass 2015 in sub select i didn't get any value.                                                                         

View 2 Replies View Related

Analysis :: Parent Child Dimension Not Displaying Name Value

Apr 16, 2015

I have a parent Child attribute in my dimension.  It show the correct ID value in the reports but when I change the value from the NameColumn to be something else it still only shows the ID value. I have an identical case in another dimension and it is working correctly.  However this dimension for some reason does not seem to work and I believe they are built the same way I must be missing something.  I have tried to show the OrgNodeID and tried to display the OrgNodename but neither displays all it displays is the intdimParentOrgNodeID.My dimension table looks something like this

intdimOrgNodeID int Key (surreget key)
intOrgNodeID int (Actual ID)
intDimParentOrgNodeID
intOrgNodeName

[code]....

View 4 Replies View Related

Parent-Child-Dimension In SQL Srv 2005 Analysis Services

Jul 20, 2005

Hi experts,having a parent-child-table with the columns child_id, child_name, parent_idin SQL Server 2005 I just cannot create a parent-child dimension in BI DevStudio. Can anyone give me some hints? The Dim Build wizard doesn't createthe hierarchies, manually setting "parent" property to parent_id and "key"to child_id as well as dragging and dropping the stuff into the hierachyfield haven't just led to success. I also tried to right-click bothparent_id and child_id to create a member property. It just never workedout.Any help would be greatly appreciated.Kind regards,Joerg

View 1 Replies View Related

Analysis :: Include And Exclude Children In A Single Hierarchy In Parent Child Dimension In MDX

Apr 8, 2015

Include children and exclude children in a single  hierarchy in parent child dimension in mdx

*12-parent
 **20-parent
 - 9-parent
       --250-child1
       --210-child2
        --240-child3
aggregation of 12-parent only
aggregation of 20-parent only
aggregation of  9 with children

View 3 Replies View Related

Analysis :: Distinct Count Using Filter Function

May 27, 2015

My requirement is to count the customer order number for premium order type orders which has some order quantity.I am using below MDX

count

Filter
(([Customer Order].[Dim Customer Orderkey].[Dim Customer Orderkey].members,
[Outbound Order Attributes].[Order Type].&[P]),[Measures].[Ordered, pcs]>0 ) ,
)

The result is accurate but the query execution time is 3-4 minutes for 10 fact records, when i use multiple dimension. it is showing me 0 valus for this measure for all the members for the dimesion attribute which doen't have any customer order. example it shows all the member of date dimension. is there any way to reduce the rows. i think this is the reason to take more execution time.when i use EXCCLUDEEMPTY the result is NULL

count

Filter
(([Customer Order].[Dim Customer Orderkey].[Dim Customer Orderkey].members,
[Outbound Order Attributes].[Order Type].&[C]),[Measures].[Shipped, pcs]>0 ) ,
EXCLUDEEMPTY)

View 3 Replies View Related

Report Against Parent-child Referenced Dimension

Feb 20, 2008

Hello,

I want to create a report in SSRS against a cube in SSAS 2005.

I have a Sales fact table, a Products dimension which is related directly to the fact table, and a Categories dimension which is related to the fact through Products (referenced dimension).

Fact --> Products --> Categories

In the Categories dimension i have also implemented a parent-child hierarchy. Only leaf category members are joined to Products.

Is it possible to create a report, drilling down from parent categories to child categories to products?

I 've already implememted the categories parent-child report but when i add the Products dimension in the flattened rowset, the Products seem to be joined to non-leaf category members.

Thanks.

View 4 Replies View Related

Report Based On Parent-child Dimension

Feb 19, 2008

Hello,

I want to create a report based on an AdventureWordsAS parent-child dimension.

I created a new report item.
In the Data tab i created a new dataset using AnalysisServicesAS data source.
I dragged and dropped into the designer [Organization].[Organizations] and [Measures].[Financial Reporting].[Amount] from the metadata pane.

How can i configure a table control in the Layout tab, to create a drilldown report?
How do i set the Group On and Parent Group fields if i have only one attribute?

Thanks in advance

View 1 Replies View Related

Creating Report Based On Parent-child Dimension

Nov 17, 2005

Hi

View 43 Replies View Related

Aggregation Issue With Parent Child Dimension When Not Using Primary Key

Mar 10, 2006

When creating a parent child dimension I am not using the primary key of the underlying table. I define the key when I create the dimension. The parent/child relationship works fine but my measure aggregation does not work.

The dimension has a regular relation type to the measure and the primary key from the underlying dimension table is used in the relationship to join in the measure. Since I have not used the primary key in the dimension and have defined my own key the define relationship page warns me that I have selected a non-key granularity attribute and I must directly or indirectly relate all other attributes to it. When I attempt to relate the attributes on the dimension structure tab I receive errors that I have created an attribute loop.

Any ideas?

View 3 Replies View Related

Excel Export Report With Parent Child Dimension OLAP

Feb 6, 2008


Hi,

I have a problem with a reporting services 2005 report.
The data source is OLEDB for OLAP 9.


The report contains all the members of a parent child dimension. An example of the implementation is defined in the post following the forum msdn:
Http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138549&SiteID=1.


The report works fine in web. The problem is when the report is exported as Excel, the groups disappeared and the entire dimension is ragged down.


Normally toggled groups in reporting services are exported to Excel with the appearance '+' or '-' on the left side of the sheet. This feature is very useful to hide / show lines.

It seems that with the implementation specified in the msdn post above,
It is not possible to export correctly the report in Excel.

So my questions are:

Has someone already encountered this problem?
Are there solutions with a different implementation?

Thanks,

Gurvan

View 2 Replies View Related

Analysis :: Best Way To Add Additional Parent Child Attribute Values

Apr 16, 2015

I have a parent Child attribute in my dimension.  I am currently displaying the correct ID value as the business wants.  So now they can see the rollup of the ID(intOrgNodeID ) values.They would also like to see the same rollup of the Name (vcharOrgNodeName)  for this ID.However they do not want it concatenated.  They want to be able to see them separate.You cannot create two parent child attibutes in one dimension so not sure if there is some simple trick to make this work? It seems like there should be some simple trick for this. 

My dimension table looks something like this
intdimOrgNodeID int Key (surreget key)
intOrgNodeID int (Actual ID)
intDimParentOrgNodeID
vcharOrgNodeName
In the Propertys I have set this below.
KeyColumns  = tbldimOrgNode.intDimParentOrgNodeID
NameColumn = tbldimOrgNode.intOrgNodeID

View 8 Replies View Related

Analysis :: If Parent Is NULL But Child Have Transaction Will Not Come In MDX Query

Oct 15, 2015

I have parent child dimension,

for customer id-101
---------H1-p  Sales Value-50
---c1-c  Sales Value-100
---c2-c Sales Value-200

If I will see H1 Value then it show =350

But when my head office is not exists for a customer but Child is exist i want to see data of child Aggregate value.

Example

for Customer ID-102
NO --H1 it is null
----c1 c sales Value -200
---c2 c Sales Value-50

When I want to see value of 102 at H1 leval it show me 250 . even H1 is  null.

View 3 Replies View Related

Transact SQL :: Parent / Child Tables - Pivot Child Data To Parent Row

May 19, 2015

Given the sample data and query below, I would like to know if it is possible to have the outcome be a single row, with the ChildTypeId, c.StartDate, c.EndDate being contained in the parent row.  So, the outcome I'm hoping for based on the data below for ParentId = 1 would be:

1 2015-01-01 2015-12-31 AA 2015-01-01 2015-03-31 BB 2016-01-01 2016-03-31 CC 2017-01-01 2017-03-31 DD 2017-01-01 2017-03-31

declare @parent table (Id int not null primary key, StartDate date, EndDate date)
declare @child table (Id int not null primary key, ParentId int not null, ChildTypeId char(2) not null, StartDate date, EndDate date)
insert @parent select 1, '1/1/2015', '12/31/2015'
insert @child select 1, 1, 'AA', '1/1/2015', '3/31/2015'

[Code] .....

View 6 Replies View Related

Transaction Count After EXECUTE Indicates That A COMMIT Or ROLLBACK TRANSACTION Statement Is Missing. Previous Count = 1, Current Count = 0.

Aug 6, 2006

With the function below, I receive this error:Error:Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.Function:Public Shared Function DeleteMesssages(ByVal UserID As String, ByVal MessageIDs As List(Of String)) As Boolean        Dim bSuccess As Boolean        Dim MyConnection As SqlConnection = GetConnection()        Dim cmd As New SqlCommand("", MyConnection)        Dim i As Integer        Dim fBeginTransCalled As Boolean = False
        'messagetype 1 =internal messages        Try            '            ' Start transaction            '            MyConnection.Open()            cmd.CommandText = "BEGIN TRANSACTION"            cmd.ExecuteNonQuery()            fBeginTransCalled = True            Dim obj As Object            For i = 0 To MessageIDs.Count - 1                bSuccess = False                'delete userid-message reference                cmd.CommandText = "DELETE FROM tblUsersAndMessages WHERE MessageID=@MessageID AND UserID=@UserID"                cmd.Parameters.Add(New SqlParameter("@UserID", UserID))                cmd.Parameters.Add(New SqlParameter("@MessageID", MessageIDs(i).ToString))                cmd.ExecuteNonQuery()                'then delete the message itself if no other user has a reference                cmd.CommandText = "SELECT COUNT(*) FROM tblUsersAndMessages WHERE MessageID=@MessageID1"                cmd.Parameters.Add(New SqlParameter("@MessageID1", MessageIDs(i).ToString))                obj = cmd.ExecuteScalar                If ((Not (obj) Is Nothing) _                AndAlso ((TypeOf (obj) Is Integer) _                AndAlso (CType(obj, Integer) > 0))) Then                    'more references exist so do not delete message                Else                    'this is the only reference to the message so delete it permanently                    cmd.CommandText = "DELETE FROM tblMessages WHERE MessageID=@MessageID2"                    cmd.Parameters.Add(New SqlParameter("@MessageID2", MessageIDs(i).ToString))                    cmd.ExecuteNonQuery()                End If            Next i
            '            ' End transaction            '            cmd.CommandText = "COMMIT TRANSACTION"            cmd.ExecuteNonQuery()            bSuccess = True            fBeginTransCalled = False        Catch ex As Exception            'LOG ERROR            GlobalFunctions.ReportError("MessageDAL:DeleteMessages", ex.Message)        Finally            If fBeginTransCalled Then                Try                    cmd = New SqlCommand("ROLLBACK TRANSACTION", MyConnection)                    cmd.ExecuteNonQuery()                Catch e As System.Exception                End Try            End If            MyConnection.Close()        End Try        Return bSuccess    End Function

View 5 Replies View Related

Pass Back Error Count To Parent Pkg

Aug 29, 2007

I am trying to pass back the number of errors encountered by a child package to the Parent package. I have a script within the child package, which will set the value of the Parent package's variable (ChildErrCount). However, I have no idea how to access the Child package's Errors collection to get a count.

Any ideas? Has someone figured out a way to reference the current package's properties (besides what's available from Dts.* ?

Thanks!

View 11 Replies View Related

Transact SQL :: Delete Query Based On Count Of Child Records?

Oct 12, 2015

I've been able to get this select query to work, but I'm not sure how to modify it to turn it into a DELETE query:
  
USE QSCTestENG
select p.[testid], COUNT(c.[testid])
FROM [dbo].[tblTestHeader] p
left outer join [dbo].[tblTestMeasurements] c ON p.[testid]=c.[testid]
where p.[model] = 'XPPowerCLC125US12'
group by p.[testid]
having COUNT(c.[testid]) <>48;

View 2 Replies View Related

Analysis :: SSAS Time Period Dimension Aggregation

Jul 27, 2015

I have a monthly time period dimension representing average number of students for each month. At the yearly aggregate level I don't want it to sum up the avg number of students from every month because that number is incorrect. I would like it to use the number of students from the most recent month as a roll up. Is that possible to configure in SSAS?

View 2 Replies View Related

Analysis :: How To Change The Member Names Of Time Dimension

Oct 19, 2015

<SQL Server 2008 R2>

I created a Time table using BIS. I found that the default naming of time members is too long and redundant.

For example, the wizard generated "Fiscal Calendar 2015", "Fiscal Quarter 1, 2015", etc. However, shorter expression like "FY2015", "FQ1 2015", etc would be enough for me. 

Is it possible to change the default naming rule, or does SSAS works correctly if I update the Time table values using SQL?

View 2 Replies View Related

Analysis :: Top Count With Non Empty Clause

Aug 7, 2015

I have an autogenerated MDX.

Select
Non
Empty{[Measures].[Exposure
Amount]} On
Columns,
Non Empty TopCount( 
(  AddCalculatedMembers(

[Code] ....

As a result I only get 29 records. One record in the middle is missing. If I change to Topcount 31 I get 32 records, where the missing record  is also included.

If I remove the Zero supression I receive 30 records as expected. For me the MDX looks good. I will try to reproduce on AW.

View 5 Replies View Related

Analysis :: Count Columns Of A Result - MDX

Jun 26, 2015

I am trying to count the columns of a MDX query but I haven't yet found a solution. Below is the query 

SELECT NON EMPTY Hierarchize({DrilldownLevel({[Customer].[Customer].[All]},,,INCLUDE_CALC_MEMBERS)})
ON COLUMNS
FROM [XCUBE] WHERE (
[TIME].[Year Quarter Month].[Quarter Name].&[Quarter 1, 2015],
[CustomerType].[CustomerType].&[Money],
[Measures].[Total X]
)

With result as

All           r  k  l   j   g  l 
7000      1 7  8  5  4  3

The All counts the total of the [Measures].[Total X] and I want to measure the number of columns that presented at the result. Unfortunately my dimension Customers doesn't connect with time dimension...

View 3 Replies View Related

Analysis :: Distinct Count On Cube

Jun 12, 2006

i am currently trying to build a distinct count on my cube (mssql2005 analysis services).But after i added the discount count on the field i want to and start the processing, the following errors appear.Errors in the OLAP storage engine: The sort order specified for distinct count records is incorrect.

View 17 Replies View Related

Analysis :: MDX - Count A Set As Calculated Measure

Sep 9, 2015

I am trying to count a set as a calculated measure, when this set is called directly in the row , it returns fast, but when i try to count the set as calculated measure(so i can slice with another dimension) the query keeps running forever.

The queries are below

select
{} on 0,
nonempty
(
{([Transaction].[RPC Count].&[1],[Transaction].[Account ID].[Account ID])}
,
{([Account].[PAYMENTSTATUS].&[0],[Account].[Account ID].[Account ID])}
)  on 1

[Code] .....

View 5 Replies View Related

Analysis :: Count Working Days MDX

Nov 23, 2015

 I would like to count the working days of a spesific time range and then find the Average Daily Dispatches.Currently the time range is at WHERE statement. how to count the dates in a month range. I prefer not to add a new calc Member.

WITH MEMBER [Measures].[Working Days] AS
COUNT(Date.[Working Date].&[1])--Doesn't work
MEMBER [Measures].[Average Daily Dispatches] AS
[Measures].[Total Dispatches]/[Measures].[Working Days]
SELECT [Measures].[Average Daily Dispatches] ON 0
FROM [cube]
WHERE (
[Date].[Month].&[2015-01-01T00:00:00]:[Date].[Month].&[2015-08-01T00:00:00]
);

View 4 Replies View Related

Analysis :: Count Of Rows In SSAS MDX Query

Sep 17, 2015

I need to find the percentile using cube so i am using the below formula :

((n-1) * p /100) -1

n= count of number of array records
p= percentile

I am using below MDX query:

WITH MEMBER [Measures].[PV] AS 25
Member [Measures].[CntCT] as Count(NonEmpty([Tb City].[City Name].&[DC], [Measures].[CPT1]))
Member [Measures].[PVInt25] as  Int(((([Measures].[CntCT] - 1)* [Measures].[PV])/100) - 1)
Member [Measures].[PVC] as ([Measures].[CPT1],Order(NonEmpty([Tb City].[City Name].&[DC],[Measures].[CPT1]),
[Measures].[CPT1],ASC).Item([Measures].[PVInt25]))

Select [Measures].[PVC] on columns, {[Tb City].[City Name]} on rows from test;

The line 2:
Member [Measures].[CntCT] 

In that i need to find the n count of rows where city is DC (City is my Dimension) in Measures CPT1

But currently it is giving the result 1 instead in actual in my test cube there is the city DC exists with 23 CPT1 rows count.

I tried the below query:

SELECT NON EMPTY {[Tb City 1].[City Name].[City Name].&[DC]  } 
   ON COLUMNS, NON EMPTY { ( [Measures].[Tb Main Count] ) }
 ON ROWS FROM [test]

Above query gives me the correct count i.e. 23 but i need to get the result of above query in line 2 of MDX query:

Member [Measures].[CntCT] 

View 4 Replies View Related

Analysis :: How To Get Cumulative Count Of Business Days

Jul 9, 2015

I am trying to get a cumulative count of business days. I have a column in my date dimension BusinessDayInd which is 'Y' or 'N'. I have been trying to create a calculated column in the cube but have not been successful yet. I think I'm close with this:

   COUNTROWS(FILTER(DATESMTD(PostingDate[Posting Date]), PostingDate[BusinessDayInd] = "Y"))

However, this is giving me a count of calendar days for all business days and null for non-business days. How do I apply the filter to DATESMTD? I've tried many iterations of this using CALCULATETABLE, CALCULATE, and FILTER. All are giving me the same result.

What am I doing wrong?

View 7 Replies View Related

Analysis :: Count Distinct In SSAS Cube?

Sep 8, 2015

Background: I have a Huge fact dimension table(table has both measures and dimensions) that i am using to build a SSAS Cube. 

The table didn't have a unique identifier, so the database team added ROW NUM as a column to the table which i am using as a PrimaryKey in my Cube build. I was able to create a cube successfully with it without any issues.

Problem: Now customers are asking for a 'Claim Count calculation' which shows the Distinct Claim Count. 

Its defined as below :

Count(Distinct Claim_Number || Claim Year || Claim Month)

. All the 3 columns are available in table, but when i am trying to create this Count Distinct Object in the DSV the Cube processing time increased by 5 times, as now i have to use a GroupBy function in my SQL.(There are around 30 columns to group by). 

Is there a better way to achieve this Count(Distinct Claim_Number || Claim Year || Claim Month) without using groupBy in DSV SQL logic? I cant seem to find any Count(Distinct) function in the Cube Calculation functions?

Environment: SSAS 2012 Multidimensional Model

View 4 Replies View Related

Analysis :: Add Dimension To Cube Dimension Without Any Relation In Dimension Usage

Oct 26, 2015

When i add a dimension to the cube dimension without any relation in my dimension usage to any measure group my units are going down.However when i remove the dimension from the cube am getting the correct values.

View 4 Replies View Related

Analysis :: Change Dimension Storage Type As Real-time Rolap But Error Occurs?

Jul 7, 2015

I Create a measure group and two dimensions using  [AdventureWorksDW2012], I try to change one dimension's storage mode with setting property proactive caching as Real-Time ROlap. There is no any warning message when deploying and processing, but error occurs when I query in sql server analysis services, see below for the error messages and the screen capture.

Error occurred retrieving child nodes: the current operation was cancelled because another operation in the transaction failed.

View 2 Replies View Related

SQL 2012 :: Group By Parent With One Child And Multiple Child Information?

Jul 25, 2014

Basically i have three Tables

Request ID Parent ID Account Name Addresss
1452 1254789 Wendy's Atlanta Georgia
1453 1254789 Wendy's Norcross Georgia
1456 1254789 Waffle House Atlanta Georgia

Bid_ID Bid_Type Bid_Volume Bid_V Bid_D Bid_E Request_ID Parent ID
45897 Incentive 10 N/A N/A N/A 1452 1254789
45898 Incentive 10 N/A N/A N/A 1453 1254789
45899 Incentive 10 N/A N/A N/A 1456 1254789

Bid_Number Bid_Name Request_ID Parent ID
Q789456 Wendy'Off 1452 1254789
Q789457 Wendy'Reba 1452 1254789
Q789456 Wendy'Off 1453 1254789
Q789457 Wendy'Reba 1453 1254789
Q789456 Wendy'Off 1456 1254789

I want the Result

Parent ID Bid_Type Bid_Volume Bid_V Bid_D Bid_E AutoGeneratedCol
1254789 Incentive 10 N/A N/A N/A 1
1254789 Incentive 10 N/A N/A N/A 2
Bid Number AutoGeneratedCol_Link
Q789456 1
Q789457 1
Q789456 2
Request ID AutoGeneratedCol_Link
1452 1
1453 1
1456 2

View 1 Replies View Related

How To Use Count() Function?

Apr 17, 2008

Dear all,

I have a table with the the following columns:

ProductCode varchar(50) PK,
ProductType varchar(50),
ProductCategory varchar(50),
InStock (bit),
Locked (bit)

What I want to do is to query this table to return me a list of product type and category, and the total number of products in each category, and the count of number of instock, and locked.

i.e. Type, Category, TotalCount, NumberInStock, NumberNoStock, NumberLocked, NumberUnlocked.

How do I do this in a query?

Any help is very much appreciated.

Eugene

View 5 Replies View Related

With Out Using Count(*) Function

May 6, 2008

How can know I how may records are there in a table with out using count(*)

Regards
Reddy

View 4 Replies View Related

SUM A Count Function

Oct 26, 2007

I need to perform a summation on the results of a COUNT but I'm not sure what's the best way to do it.

Example:
TableA
---------------
CaseID (int)
FollowupCorrespondence (int) (not guaranteed to be sequential)
CustomerName (varchar)


/**Get the total number of followups for each customer case, and display the customer's name.*/
select T.caseid, sum(T.cnt), T.CustomerName,
T.FollowupCorrespondence
from (select CaseID, count(FollowupCorrespondence)
as cnt, CustomerName,
FollowupCorrespondence
from tableA
group by caseID, CustomerName,
FollowupCorrespondence;
) as T
group by caseid, customername, followupcorrespondence

I get the following output, but what I need is to get '4' in each row of the SumCases column.
CASEID SUMCases CUSTOMERNAME FOLLOWUPCORRESPONDENCE
----------------------------------------------------------------------------------------------------------------
1.................1.............John Doe................1
1.................1.............John Doe................2
1.................1.............John Doe................3
1.................1.............John Doe................4

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved