This is the script written in mdx used by analysis services when processing the `olap` cube.
Questions tagged [cube-script]
12 questions
3
votes
0 answers
Executing DMV catalog query after a SSAS cube process forces execution of all DB scripts
After processing an 2012 SSAS cube, then executing a DMV query, such as:
select * from $system.mdschema_sets where [cube_name]='cube name'
i see in sql profiler it executes scripts of ALL cubes in the database, disregarding the restriction in the…

Kobi Averbuch
- 41
- 1
2
votes
0 answers
PY Total for Selected Time Attribute Hierarchy in SSAS cube
I was able to calculate PY Total for Selected Time Dimension's Attributes in individual Hierarchy but cannot figure out how to make it work for both Time Dimension Hierarchies with single calculated measure.
I had to USE Dynamic SET to populate Days…

Anup Pudasaini
- 53
- 6
2
votes
1 answer
Calculated Member for the TOTAL of a measure for multiple Dimensions
I am trying to TOTAL a measure with a calculated measure AS
CALCULATE;
CREATE MEMBER CURRENTCUBE.[Measures].[Total On Hand Amount]
AS ([Warehouses].[Warehouses].[All],[Measures].[On Hand Amount]),
FORMAT_STRING = "#,#",
VISIBLE = 1;
This is…

Anup Pudasaini
- 53
- 6
2
votes
0 answers
How to add a metric for top n count in mdx
I want to create a metric which will show only the top 10 result whenever applied.
Suppose the data is
item Price
A 20
B 45
C 50
D 80
E 10
F 90
G 85
H 55
I 40
J 100
I want to show the top 5 result in descending order. So, the expected result…

Tyler Durden
- 207
- 1
- 5
- 10
2
votes
1 answer
MDX calculation. Divide each member by grand total
SAMPLE DATA
I have exported OLAP cube in following format (Measure [Some Percent] usage is Average over time):
[Net Weight] [Some Percent]
4 387 2,10%
3 304 1,60%
Grand total: 7 691 …

Stanislovas Kalašnikovas
- 9,203
- 4
- 32
- 59
1
vote
2 answers
Calculated Members with multiple Attribute Hierarchy - MDX
I found this little code where it dynamically calculates TOTALs for all Dimension/Hierarchy I want.
This is close to what I need but will not work for Dimensions that have different number of Hierarchy Levels (Attribute Hierarchy). Current Code only…

Anup Pudasaini
- 53
- 6
1
vote
3 answers
MDX Calculated member with filter
Being pretty new to MDX so this might be a rookie question. But have not been able to "translate" any answers to a solution!
I have a Measure which Counts my number of rows called [Measures].[Fact Count]
I also have a Dimension called [Document]…

olf
- 860
- 11
- 23
1
vote
1 answer
Getting year-end values from prior year on each result row of MDX query
I have a snapshot fact table with a time grain of monthly and so the measure values are only point in time, not cumulative over time. I need to derive a Previous Year-End value to compare any given month's values to the end of the previous year…

Iwantallthedata
- 43
- 3
0
votes
0 answers
SSAS calculated measure with unary operator
I have an account dimension with a parent-child hierarchy. I need to flip the signs on some of the leaf levels, so I created a calculated measure to handle this, and it works great except for one issue. The account hierarchy uses unary operators to…

Jason Mitchell
- 1
- 1
0
votes
0 answers
SSAS calculation with division combined with a time calculation
Situation:
I have created calcalated measures in a SQL Server 2012 SSAS multi dimensional model by creating empty measures in the cube and use scope statements to fill the calculation.
(so I can use measure security on calculations as explained…

P Meindertsma
- 1
- 1
0
votes
1 answer
MDX as Calculated Member in SSAS Cube
I have a FactBudget per sales region with fields [Budget SalesRegion] and [Sales Region]. In the dimension DimCustomer I have the fields [Sales Region] and [Customer Type].
The relation between FactBudget and DimCustomer is defined only on the…

baeschti
- 54
- 6
-1
votes
1 answer
How to Create OLAP cubes programmatically using Visual Studio
I am new to SQL Server Data Tools. After browsing the internet to learn the BI suite I found out that SSIS SSAS SSRS has more than just drag and drop. People are actually creating cubes and databases programmatically. Unfortunately, I couldn't find…

user3323487
- 61
- 1
- 1
- 10