![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| The problem with [top 10 final g codes] may be that Named Sets are not |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hi Deepak, I understand precisely what you mean, and to be clearer: what I am interested in are the top 5 exposure amounts (at the instrument level) at each date, regardless of what instruments they are actually attached to. Ideally the table would look like this: Date Exposure1 Exposure2 Exposure3 Exposure4 Exposure5 ...... where each Exposure is for a different instrument and Exposure1 Exposure2 > Exposure3 etc. Thank you for pointing me to the earlier query. I am quite new to databases and very new to MDX so it was a little complex to digest, but after reading that I thought of trying a CrossJoin within the TopCount, but this hasn't worked. The code is: with set [Top 5 Instruments] as ' TopCount( CrossJoin({[Instruments].[Instrument Short Name].members},{[Calendar Time].[27 Sep 2002]:[16 May 2005]}) ,5, ([Measures].[Exposure (USD)],[Calendar Time].[27 Sep 2002]) )' select non empty {[Top 5 Instruments]} on columns from [Positions by Instrument] where ([Measures].[Exposure (USD)], [Trader].[X]) This has just brought up a set of 5 dates and some exposure numbers on those dates. Is this something like the 5 dates with the highest exposures? I'm not sure how its used the instruments but this is not what I am looking for. Thanks. |
#5
| |||
| |||
|
#6
| |||
| |||
|
| With |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |