none
Referenced Dimenssion Set up in Cube Dimenssionusage

    Question

  • Hi,

    I have this table structure

    create table dbo.student_fee
    (
    	student_fee_id int identity(1,1) primary key,
    	student_id int,
    	tution_fee numeric(5,2),
    	library_fee numeric(5,2),
    	misc_fee numeric(5,2)
    	
    )
    create table dbo.student
    (
    	student_id int identity(1,1) primary key,
    	first_name varchar(50),
    	last_name varchar(50)
    )
     
    create table dbo.student_hrchy
    (
    	student_hrchy_id int identity(1,1) primary key,
    	student_id int,
    	hrchy_name varchar(50)
    )
     
    insert into dbo.student
    (
    	first_name ,
    	last_name
    )
    values
    ('aaa','bbb'),('ccc','ddd'),('eee','fff'),('ggg','hhh')
    
    insert into dbo.student_fee 
    (
    	student_id ,
    	tution_fee,
    	library_fee,
    	misc_fee
    )
    values
    (1,20.00,35.00,14.78),(1,10.00,55.00,84.78),(1,80.00,95.00,54.78),(1,70.00,85.00,94.78),(1,30.00,75.00,84.78),
    (2,60.00,55.03,45.78),(2,80.00,75.00,94.78),(2,70.00,65.00,34.78),(2,90.00,05.00,03.78),(2,3.00,7.00,12.78),
    (3,10.00,65.00,24.78),(3,40.00,65.00,34.78),(3,20.00,55.00,64.78),(3,70.00,15.00,34.78),(3,60.00,15.00,24.78),
    (4,80.00,11.00,22.78),(4,33.00,44.00,55.78),(4,66.00,12.00,13.78),(4,14.00,15.00,24.78),(4,50.00,65.00,64.78)
    
    insert into dbo.student_hrchy 
    (
    	student_id ,
    	hrchy_name
    )
    values
      (1,'Regular'), (1,'Excellent'),(1,'Medium'),
      (2,'Regular'), (2,'Excellent') ,
      (3,'Regular'),(3,'Medium'),
      (4,'Regular'), (4,'Excellent'),(4,'Medium')
      
      select * from dbo.student 
      select * from dbo.student_hrchy  
      select * from dbo.student_fee 
      
      select * from dbo.student_hrchy where hrchy_name ='Regular'
      select * from dbo.student_hrchy where hrchy_name ='Excellent'
      select * from dbo.student_hrchy where hrchy_name ='Medium'

    I defined the structure in the DSV as like this.

    But when I am retrieving the data student dimenssion it is showing correctly. the data is dividing by student

    If want to retrieve the data using student hrchy it is showing all the counts available. it is not dividing by student.

    its showing the data with out proper relations.

    How can i retrieve proper data when I select

    1. Regular student hierarchy ?

    2.Medium student hierarchy ?

    3, Excellent student hierarchy ?

    with out changing the table structure how can i achieve this?

    Thanks for any help.

    Thanks.


    Saturday, September 21, 2013 12:08 PM

Answers

  • Hi Chakri,

    I tried to reproduce this issue on my test environment, but everything was fine. Please see the screenshot below:

    Please refer to the following dimension usage and attribute relationships of "Student Hrchy" dimension:

    I didn't change other settings for the cube, could you please have a check on your side?

    Best Regards,


    Elvis Long
    TechNet Community Support

    Tuesday, September 24, 2013 6:25 AM

All replies

  • I quickly ran through your code and it...quite confused. Just forgetting your code what result do you want achieve using Olap cube?
    Sunday, September 22, 2013 3:58 PM
  • Hi ,

    Thanks for the reply. here is my problem when i browse thorugh hierarchy dimenssion I am getting all the measures as same.

    Thanks,

    Chakri.

    Monday, September 23, 2013 5:44 PM
  • Hi Chakri,

    I tried to reproduce this issue on my test environment, but everything was fine. Please see the screenshot below:

    Please refer to the following dimension usage and attribute relationships of "Student Hrchy" dimension:

    I didn't change other settings for the cube, could you please have a check on your side?

    Best Regards,


    Elvis Long
    TechNet Community Support

    Tuesday, September 24, 2013 6:25 AM