Current day/month
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| WITH MEMBER [Measures].[ Day Revenue] AS AGGREGATE( PERIODSTODATE([Calendar].[ Day ],[Calendar].CurrentMember), [Measures].[Sales Revenue EUR] ) MEMBER [Measures].[ Month Revenue] AS AGGREGATE( PERIODSTODATE([Calendar].[ Month ], [Calendar].CurrentMember), [Measures].[Sales Revenue EUR] ) |
Previous day/month
1
2
3
4
5
6
7
8
9
| MEMBER [Measures].[Yesterday Revenue] AS PARALLELPERIOD([Calendar].[ Day ],1,[Calendar].CurrentMember), [Measures].[ Day Revenue] ) MEMBER [Measures].[ Last Month Revenue] AS PARALLELPERIOD([Calendar].[ Month ],1,[Calendar].CurrentMember), [Measures].[ Month Revenue] ) |
This is just to make my select statement compact
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| MEMBER [Measures].[Today] AS ([Measures].[ Day Revenue], ([Calendar].[ Hour ])) MEMBER [Measures].[Yesterday] AS ([Measures].[Yesterday Revenue], ([Calendar].[ Hour ])) MEMBER [Measures].[This Month ] AS ([Measures].[ Month Sales Revenue], ([Calendar].[ Hour ])) MEMBER [Measures].[ Last Month ] AS ([Measures].[ Month Revenue], ([Calendar].[ Hour ])) SELECT { [Measures].[Today], [Measures].[Yesterday], [Measures].[This Month ], [Measures].[ Last Month ] } ON COLUMNS FROM [ Cube ]
|
Komentar
Posting Komentar