Questions tagged [mdx]
Multidimensional Expressions (MDX) is a query language for OLAP databases. It was developed by Microsoft but has later gained widespread support from other OLAP vendors.
3,925
questions
-4
votes
0
answers
24
views
How to convert this MDX script into DAX for creating a measure in Power BI [closed]
I have a table named "units of measure" and a field named "UoM Code" under the table "units of measure". The following MDX script is below:
CREATE MEMBER CURRENTCUBE.[...
0
votes
1
answer
29
views
How to render from a mdx file of same directory to a react component?
import React from 'react'
import { Link, graphql } from 'gatsby'
import { Wrapper, SectionTitle, Header, SectionSubTitle, SEO } from 'components'
import { Layout } from 'layouts'
import { Content } ...
0
votes
0
answers
15
views
How to create calculated measure lastchild in Kylin MDX?
Colleagues, good afternoon!
There is no lastchild type for measures by default in Kylin. Therefore, a problem arises when calculating such indicators as the stock. Monthly stock = stock on the last ...
1
vote
1
answer
30
views
MDX Comparing Dates (Before and After)
Hoping for any help with hopefully a simple problem - I'm writing MDX into a rule builder within a company application. Here is the expression:
IIF(Time.CurrentMember >= [Time].&[456], "...
0
votes
1
answer
37
views
Why SQL Server Analysis Services Remote Connection work in Excel but not C# Web App
I have a SQL Server Analysis Services Cube published to a remote windows server, not attached to a domain.
I can use use Excel to connect to it remotely by using the wizard at Data -> Get Data ->...
0
votes
1
answer
23
views
MDX Add Condition to filter for the first 6 month of the year
I would like to find the top 10 most profitable customers in the first six months of the year 2021 (January through June) sorted by profit in descending order.
The following filter for all criteria ...
0
votes
0
answers
12
views
MDX. Mixing measures with dimensions
Have multiple departments, which have monthly sales' measure and "Inception to Date" (ITD) and "Year to Date" (YTD) sales' data measures.
SELECT {[Dep1], [Dep1ITD], [Dep1YTD], [...
0
votes
1
answer
20
views
MS SSAS - Need to return a measure in a calculated member based on a tuple set and a max ofunderlying ID
I require some more advanced MDX knowledge than mine.
I need to get the RepoRate_MAX for repo products, at book and instrument level, but also looking at the Java code I'm replacing that code always ...
0
votes
1
answer
38
views
UNION ALL of 2 MDX queries (within data cube)
I'm mdx rookie..
A box of gold for whoever can tell how to do UNION ALL of these two MDX queries:
SELECT
{
[Measures].[P Count]
}
ON COLUMNS,
{
(
[Dim P View].[Person Key].[Person Key].ALLMEMBERS *
[...
0
votes
0
answers
16
views
Excel 2016 pivottable pagefield will not let me use values that are working in MDX against the same SSAS cube
I've got a few legacy (Excel 2016 VBA driven pivot table reports) reports which need to talk to a new SSAS cube I've made (Multi-dim as our server cannot support tabular yet).
Construction of most of ...
0
votes
0
answers
33
views
MDX Sum for an ordered Set
I want to create a measure for the running total of sales.
The customer dimension need to be ordered by their sales amount.
Want I want to get:
H1
Sales
CumSales
B
10
10
C
3
13
A
2
15
Thank you!
...
4
votes
0
answers
43
views
Find Number of times a particular character appears in a string using MDX query
In the Microsoft SSAS, I have a dimension column that contains multiple values separated by the special character | in a single row as below.
Example value of a row: Image|Video|Audio|
Requirement:
So,...
1
vote
0
answers
32
views
Calculated member disappears when rearranging columns in field list
I have created a calculated member with the OLAP-Tools in Excel.
Think of it like:
[Customer].[Customer Geography].[Country].&[Germany] - [Customer].[Customer Geography].[Country].&[Austria]
...
0
votes
0
answers
18
views
MDX join members into a single dimension pivot
I'm starting to dig my nose into MDX and its capabilities in excel pivot, and I'm having a bit of trouble with getting my head around it. I guess this is fairly easy to execute, but I just can't ...
0
votes
0
answers
13
views
Trying to get a range of all months in 1998
I have been trying to use mdx querying to filter the monthly sales and year to date sales for only the months in 1998
-- this was my first trial-------
WITH MEMBER Measures.YTDSales AS
SUM(...
0
votes
0
answers
20
views
Filtering MDX query with current month using Now() and "/"
I am very new to MDX, and am trying to write a query that will filter on the current month. Right now, my filter looks like the below:
SELECT NON EMPTY { [Measures].[ACT_X_XXX_MTD_LOCAL_X_XX_A] } ON ...
0
votes
2
answers
48
views
MDX Calculated Member filter using attribute not working
I have this setup:
ID T Date
2 T2 2022-11-18
3 T1 2022-11-21
and in the main fact table there are deals with ID 2 and 3.
Date is an attribute and appears, and works correctly, as a slicer in ...
0
votes
0
answers
14
views
MDX Query Subtotal
I am trying to get a subtotal in MDX on a separate column. Example below:
This is what I current have:
Table
This is what I am looking for:
Looking for this
If someone could please help me?
Currently ...
0
votes
1
answer
29
views
MDX Request : How to Topcount without specific members
I'm new to MDX and i am having troubles with the TOPCOUNT() function.
Lets say i want the following result →
This is what I get →
Here is like what my request would look like with this exemple →
...
0
votes
0
answers
68
views
I'm trying to aggregate a measure in Power BI Report Builder and getting nowhere
I am working on a sample project in Power BI Report Builder. (I couldn't tag it as such because apparently I'm not allowed to create my own tags on this website.) The measure I am going for in my data ...
0
votes
0
answers
17
views
Pass values from a list as a KPI parameter in MDX
I am relatively new to MDX and I am facing a challenge at moment.
I have a few KPI functions that uses a string as a parameter to call the aggregation made for that I am using as COLUMNS.
Then I have ...
0
votes
0
answers
19
views
How can I fix the error: A set has been encountered that cannot contain calculated members
Apologies in advance - I'm not very au fait with MDX
I am wanting to show the previous period variance of a measure.
I’ve tried using the following code in the Cube Calculations section :-
CREATE ...
0
votes
0
answers
68
views
What does multiple ampersands mean?
[Dim Sportsbook].[Sportsbook].[Sub Product Group].&[4]&[Sportsbook]&[1]
I know ampersand refers to a member by key, but in the above code, 3 key references are put together.
What does it ...
0
votes
0
answers
62
views
Filter Cubeset based on dimension & measure
I have a created a cube with different tables - Product Master,Sales Details,Calendar table.
I want to apply filter to cubeset function of Excel, using MDX expression.
I'm confused & result are ...
0
votes
0
answers
37
views
Pyrfc: MDX Queries Returning Fewer Fields than expected
Describe the bug
I am using PyRFC to pull data from SAP BW InfoCubes using BAPI_MDDATASET_CREATE_OBJECT, BAPI_MDDATASET_SELECT_DATA, and BAPI_MDDATASET_GET_FLAT_DATA. I pass in my MDX query, and the ...
0
votes
0
answers
44
views
Result of the Sum of all elements mdx query incorrect Analysis Service Cube
i got a weird issue with my olap cube by issuing a mdx query.
You can see that the following mdx query is generated by excel:
SELECT NON EMPTY Hierarchize({DrilldownLevel({[BuchungskreisWerk].[Quelle]....
0
votes
0
answers
77
views
How to compare year to date figures from the current year with the previous year?
With the bellow MDX query im attempting to return a comparasion of sales, but its not working
For example i want to compare the values from current year until today (29/september/2022) with the values ...
0
votes
0
answers
45
views
Filter out zero (0) values in MDX
I am looking to filter out zero values (0) from my MDX retrieve. I am querying Oracle's Essbase using the MDX below. Could someone help me with my MDX? There are no examples online and from my ...
0
votes
1
answer
20
views
Can you create text based calculated members in SSAS
Is is possible to have a calculated member that shows text instead of numerical values.For instance, classifying customers by the product they bought into Platinum, gold, silver and bronze.
Is it ...
0
votes
0
answers
11
views
ssas: different measure based on hierarchie
i have one Cube with historical "fixed" data and one month of data that still is in review and can be changed slightly. My customer wants to select the fixed data with one Time-Hierarchy and ...
0
votes
0
answers
40
views
How can I replace the duplicate values in this SASS result set with 0 using MDX?
Within SSAS (multidimensional). I've created a bridge table to hold multiple attributes for a given diagnosis. (There can be more than one diagnosis type for a given value).
I get the results to ...
2
votes
1
answer
103
views
Poor performance consuming Analysis service Tabular model via Excel
we run MS Analysis service OnPrem and data are consumed via Power BI and via Excel using Tabular model.
In some cases, we are experiencing some performance issue. If we compare some “query execution” ...
1
vote
1
answer
477
views
Import and show file content in MDX code blocks
I'm using Docusaurus to build doc. Docusaurus use MDX.
I would like to show a .json file in the doc using a code block without needing to copy/past the file content.
Instead of writting this in my md ...
1
vote
0
answers
26
views
MDX - Caption for a set of children
I'm a SQL guy getting pulled into setting up an SSAS cube and pulling it into PowerBI. I'm experimenting with MDX, and have run into something I haven't been able to find an answer for.
Scenario
I ...
0
votes
0
answers
25
views
Cumulative Running total
I have a query below that i want to have a running total on the cumulativesum column. currently it shows just the total for the period i am after.
complexity i have is the hour of day is different ...
1
vote
0
answers
27
views
Issue with calculated measures when using calculated members
I am using Excel OLAP pivot using Analytics Services. The database has customer dimension with customer codes and time dimension with dates. Measures are Sales Price, which equals turnover. In OLAP ...
0
votes
0
answers
10
views
I need to create a MDX filter that returns this operation but with the values of the last month
[Measures].[Faturamento] / [Measures].[DiasUteisMes]
0
votes
0
answers
31
views
How to compute a MDX measure in Excel that multiplies the values in one variable by a factor depending on their value in another variable?
First of all I'd like to make it clear, that I'm a total newbie to MDX and only grasp the absolute basics. I'll do my very best to try and describe my issue, and hope that some of you guys have time ...
1
vote
0
answers
44
views
SSAS MDX Calculated Measure - Grand Total not updating
Below in the snippet of Geography Hierarchy:
PFB the calculated measure query:
CREATE MEMBER CURRENTCUBE.[Measures].[Metric - vs PY %]
AS
IIf([Geography].[Geography Hierarchy].LEVEL.ORDINAL <> ...
0
votes
0
answers
15
views
SSAS 2017 Multidimension Cubes design
All ,
Newbie here,I would like to implement the following query into an existing cube.
select
f.uid as FactID,
f.product as Product,
convert(nvarchar(25),t.GL_PRODUCT_CODE) +'-' +
...
0
votes
0
answers
32
views
Compare value of one dimension currentMember to the known value of another dimension (date)
I have a dimension Date which will have two days of dates:
Date (yesterday or the day before)
T (an attribute here which is either T1 or T2)
so that I can do things like this (as a calc member) for a '...
0
votes
1
answer
11
views
MDX Query aggregate combining crossjoin expression with non-crossjoin/comma-separated expression
I have an issue while retrieving on columns with crossjoin(someMeasure1,someMeasure2) , someMeasure3. Details:
WITH MEMBER [Date].[Custom] AS
'Aggregate({[Date].&[20220101]:[Date].&[...
0
votes
0
answers
36
views
Filtering MDX query by date range
I have a rather complex cube, I am by no means an export in MDX queries, but I've done a lot of SQL.
I have a cube containing orders and a lot of data(dimensions, facts, measures) attached to these ...
0
votes
1
answer
83
views
MDX - Query Attribute in the CrossJoin - Essbase
I currently have a CrossJoin working for UDA. However we want to change to using Attribute value instead. Not sure how to get the Syntax correct to use Attribute in the CrossJoin in Essbase. I ...
0
votes
0
answers
31
views
Converting DAX userelationship expression to MDX
I'm working with a field of chargeable hours, which needs to be related to workdate rather than dimdate in DAX, and the following expression works fine in that:
= CALCULATE([Billable Worked Hours] , ...
0
votes
0
answers
33
views
SQL Server MDX query - filter out future dates
I've struggled trying to find how to filter out future dates in my MDX query. I wish it was as easy as T-SQL. I'm trying to filter out future dates from the [Dates].[Date Value] column.
Here's my ...
0
votes
1
answer
61
views
SSAS : Filter Cube
I have dimension and fact table. The dimension is PATIENTDBOID meanwhile the fact table is Total_Admissions.
Now, I want to filter for Patient that Admission >1
Can someone help me how. ?
0
votes
0
answers
25
views
SSAS Multidimensional fact to filter on dimension attribute
I have 2 facts :
F_Budget
F_Actual
They both have the same dimensions, except of D_Version, that is only for F_Budget.
In D_Version, I have an attribute ReferenceDate, so that each Budget Version, ...
0
votes
0
answers
73
views
OLAP Tools - MDX formula - How to get number of items applied in a filter in excel pivot
I've been given a pivot table pulling from a database and i need to use OLAP tools to create any calculated fields. The table is simple - we have "Products" in the rows, "sumSales" ...
0
votes
0
answers
41
views
What is the equivalent MDX for this DAX measure?
I have this measure in DAX:
Emp Count Over 75 =
SUMX(
SUMMARIZE(
'FactTable',
'Employee'[EmpID],
'Employee'[StoreID],
'Project'[Project],
"_Over75"...