US and Worldwide: +1 (866) 660-7555

# Thread: Dimensional modeling problem - multivalued dimensions and avg aggregation function

1. Junior Member
Join Date
Dec 2016
Posts
17
Hello underscores,

thank you for your reply! That for sure does overcome my knowledge too!

I've already thought about the virtual cubes. It indeed solves the problem of looking only for the grades per student, or look for the grades when considering the hobbies. But I guess the main problem is, when viewing the grades per student per hobby, if a select only the grades associated with two or more hobbies, it will inevitably count the same grade more than once, if the student has more than one of the hobbies required as the filter.

I'll keep searching for a solution, of course, but I suspect, as you said, that maybe it can't be done using Mondrian queries and the Saiku Plugin.

Best regards,
Bruno

2. Junior Member
Join Date
Feb 2017
Posts
18
Originally Posted by amaralbf
Hello underscores,

thank you for your reply! That for sure does overcome my knowledge too!

I've already thought about the virtual cubes. It indeed solves the problem of looking only for the grades per student, or look for the grades when considering the hobbies. But I guess the main problem is, when viewing the grades per student per hobby, if a select only the grades associated with two or more hobbies, it will inevitably count the same grade more than once, if the student has more than one of the hobbies required as the filter.

I'll keep searching for a solution, of course, but I suspect, as you said, that maybe it can't be done using Mondrian queries and the Saiku Plugin.

Best regards,
Bruno
Hello Bruno,

I really hope someone else will comment here and give you better help and that you achieve your goal.

With kind regards,

underscores

3. Junior Member
Join Date
Feb 2017
Posts
18
I wanted to add something to the virtual cube.
Create your Schema like this:
Cube StudentxHobby:
dimension:
Top -> Student -> Hobby
Fact: Average Grade By Student
Cube: Hobby:
Dimension:
Top -> Hobby
Fact: Average Grade By Hobby

Virtual Cube: Student And Hobby
Virtual Measure: Average Grade By Hobby
Virtual Measure: Average Grade By Student
Dimensions: Shared Dimensions (Time/Date, etc.)
Dimensions: StudentxHobby
Dimensions: Hobby
Than you can select the Dimensions you need with the Measure you need in Saiku and get both results properly. That would solve all your problems through a backdoor easily and wont reduce effiency too much. If this is an assignment you might just justify your approach like this:
Mondrian does not allow muilti-valued dimensions that are not reflexive. So you decided to calculate two measures for each to get legal results and combine them through a Virtual Cube which is a common way to combine different granularity, detail grade, dimensionality of values. Since both are different busines measures with different goals (a hobby does not study but someone with a hobby might study).

4. Junior Member
Join Date
Dec 2016
Posts
17
Hi underscores,

This approach is valid for getting the correct results when selecting by student as well as when selecting by hobby (and combining them with other dimensions). This is the result I already have, using the approach described in the posts #4 and #5 of this thread.

Said that, I don't see how this approach can solve the problem of calculating the following query: average of grades per course, filtering by 2 of 3 hobbies. It is the same query I mention on the post #5.

Thanks and best regards,

Bruno

5. Junior Member
Join Date
Dec 2016
Posts
17
Just an update, I've discussed the problem with Diethard Steiner, and this discussion led to the elaboration of a very good and informative post on his blog. The URL to the post is: https://diethardsteiner.github.io/mo...Attribute.html

I recommend checking his blog out, as I've been following his blog for a long time and have found lots of useful information regarding Business Intelligence and the use of Mondrian and Pentaho Community.

Best regards,
Bruno

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•