largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
Hi,
I'm very new to powerpivot. I am trying to pull data from an analysis services cube. Because I keep getting timeout errors when trying to pull the full data I have divided it into two sections, one which pulls the measures I want at the level I want (Field x Week x Location) and one which pulls the descriptive information for each field. The issue that I have is that there are a few instances where an entry has more than one value for "Level2". Out of 20k entries only about 500 fall into this category, but it's enough that I can't just create a relationship between my measures table and my descriptive information table.
If I were doing this in an Excel worksheet I would be totally fine just doing an index/match to pull in the descriptive information (since I don't mind if it gives me the first of multiple/different values for "Level2"). Also, I should add that part of why I don't mind if it pulls back one or the other of the two values that exist is because they are very close. Say for example one of my entries is "basket" and "Level2" represents cost - I might have 2 different costs in my data, but they are usually pretty close ($29.03, $28.94), so for the purposes of my analysis I don't mind if it pulls either of those. But I don't know how to replicate this looseness in powerpivot.
So is this possible? Would this be something that I implement in when I create the relationship (ie somehow specify a many to many (even though it's not that many) relationship)? Or would I pull the descriptive information into my measures table using a different formula than "related" and without creating a relationship between the two tables? Or is this something that I can address in my query so that it just pulls one value for each entry rather than all?
Thank you so much for your help or any direction you can give me! I've pasted the query I'm using below.
I'm very new to powerpivot. I am trying to pull data from an analysis services cube. Because I keep getting timeout errors when trying to pull the full data I have divided it into two sections, one which pulls the measures I want at the level I want (Field x Week x Location) and one which pulls the descriptive information for each field. The issue that I have is that there are a few instances where an entry has more than one value for "Level2". Out of 20k entries only about 500 fall into this category, but it's enough that I can't just create a relationship between my measures table and my descriptive information table.
If I were doing this in an Excel worksheet I would be totally fine just doing an index/match to pull in the descriptive information (since I don't mind if it gives me the first of multiple/different values for "Level2"). Also, I should add that part of why I don't mind if it pulls back one or the other of the two values that exist is because they are very close. Say for example one of my entries is "basket" and "Level2" represents cost - I might have 2 different costs in my data, but they are usually pretty close ($29.03, $28.94), so for the purposes of my analysis I don't mind if it pulls either of those. But I don't know how to replicate this looseness in powerpivot.
So is this possible? Would this be something that I implement in when I create the relationship (ie somehow specify a many to many (even though it's not that many) relationship)? Or would I pull the descriptive information into my measures table using a different formula than "related" and without creating a relationship between the two tables? Or is this something that I can address in my query so that it just pulls one value for each entry rather than all?
Thank you so much for your help or any direction you can give me! I've pasted the query I'm using below.
Code:
SELECT NON EMPTY { [Measures].[Field1], [Measures].[Field2]} ON COLUMNS, NON EMPTY { ([MHier].[Mhier].[Level1].ALLMEMBERS * [Mhier].[Mhier].[Level2].ALLMEMBERS * [MHier].[Time].[Year].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( { [Location].[Location].&[100000] } ) ON COLUMNS FROM ( SELECT ( { [MHier].[MHier].&[100], [MHier].[MHier].&[134], [MHier].[MHier].&[135], [MHier].[MHier].&[101] } ) ON COLUMNS FROM ( SELECT ( { [Time].[Time].&[2016], [Time].[Time].&[2015], [Time].[Time].&[2014] } ) ON COLUMNS FROM [cubMStandard]))) WHERE ( [Time].[Time].CurrentMember, [Location].[LocGroup].&[100000] ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
Last edited: