June 7, 2011 at 2:59 am
How is possible to aggreagate with the avg respect two dimension?
How is possible to aggreagate (by means of AVG composed by sum and count) respect to the LINESPEED dimension,
considering the COIL which have the LINESPEED value = x?
I try to explain better, with a result that I would to obtain.
Considering this two dimensions:
have this two dimensions, the first one is shared while the second one is private for the CUBE.
<Dimension name="GRUPPO">
<Hierarchy name="name" hasAll="true" allMemberName="All Coils" primaryKey="PKcoils">
<Table name="dim_coils"/>
<Level name="Campagna" column="labelCampaign" uniqueMembers="true" type="String"/>
<Level name="Coil" column="coilid_coil" uniqueMembers="true" type="Integer"/>
<Level name="Settore" column="idSector" uniqueMembers="false" type="Integer"/>
</Hierarchy>
</Dimension>
<Dimension name="LINESPEED" foreignKey="FKlineSpeed">
<Hierarchy hasAll="true" allMemberName="All LINESPEED" primaryKey="PKlineSpeed" defaultMember="[All LINESPEED]">
<Table name="dim_lineSpeed"/>
<Level name="VELOCITA LINEA" column="lineSpeed" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
Starting from this table result:
MEASURE
LINESPEEDCOIL
50 coil110
coil221
coil323
55 coil415
coil510
.....I would obtain a result as:
MEASURE
LINESPEED
50 18 = (10+21+23)/3
55 10 = (15+10)/2
thanks
regards
Nico
June 14, 2011 at 5:03 pm
for clarification...
LINESPEED (val: 50 & 55) is one dimension,
COIL (val: coil1, coil2, etc) is the other dimension,
and the 10,21,23,15 is the measure being analyzied...
correct?
LINESPEEDCOILMEASURE
-----------------------------------------
50coil110
coil221
coil323
55coil415
Data Enthusiast | @SQLbyoBI | www.opifexsolutions.com
June 15, 2011 at 1:19 am
Yes you are right!
Sorry for bad tabulation.
I would be grateful if you give me an answer
thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply