4 Followers · 56 Posts

Multidimensional Expressions (MDX) is a query language for online analytical processing (OLAP) using a database management system. Much like SQL, it is a query language for OLAP cubes.

Question Evgeny Shvarov · Apr 9, 2017

Hi!

Sometimes I need to filter the widget on a dashboard from a different cube. And I face the following problem:

Widget A refers to a query from Cube A and I want to filter Widget B from Widget B.

Widget's B pivot refers to Cube B, and which has different dimensions for the same data.

E.g. cube A has the dimension Author and the Cube B has the dimension Member for the same data. So  there is no way to filter such a widget B from the widget A.

1
1 406
Question Alexander Jäger · Apr 3, 2017

Hi,

suppose a part of my mdx query is [DIMENSION].[H1].[LEVEL1].CURRENTMEMBER.Property("PROP1").

If the source property of PROP1 is also used as a dimension level somehwere in the cube, this query will return a key  to the entry in the coresponding star table.

Does anybody know how I can follow that key and display the real value value?

1
0 1131
Question Derrek Kegler · Mar 29, 2017

How to setup dollar ranges to get the number of patient accounts. So, I want to capture the number of patient accounts based on the original balance of: 0 to 499 500 to 999 1000 to 2499 5000 to 9999 10000 to 24999 25000 to 49999 50000 to 74000 75000 to 99999

=100000

2
0 515
Question Evgeny Shvarov · Jan 24, 2017

Hi, All!

What is the calculated measure expression for the percentage of a member?

Say in Holefoods I want to see in a Cols Online sales in Revenue, All the revenue and % of Online sales for the Revenue?

I have the following:

With expression:

SELECT NON EMPTY {NONEMPTYCROSSJOIN([Channel].[H1].[Channel Name].&[2],[Measures].[Amount Sold]),[Measures].[Amount Sold]} ON 0 FROM [HOLEFOODS]

How can I add the percentage of All in Revenue for Online channel?

5
0 594
Article Alessandro Marin · Dec 6, 2016 3m read

How are we doing THIS year versus the same period LAST year? 
This is a common need in Business Intelligence. In fact, many design specifications for reports make use of a comparison between a selected period (year, quarter, etc) up to a certain date (for example November 15th, 2016) and a summary of the same information for the previous year (i.e. up to November 15th, 2015). 
This post shows how to implement this in DeepSee.

8
0 1972
Question Jenna Makin · Dec 7, 2016

Hi-

I am trying to figure out how to compare two dimension values in a MDX query such that records where two dimension values are the same will be filtered out.

To test this, I have modified the HoleFoods cube in SAMPLES namespace to have a new dimension called RandomRegion

I want to create a MDX query where the [Outlet].[H1].[Region] value is not equal to the [RandomRegion].[H1].[RandomRegion] value.

Here's the query I need to add the filter to:

SELECT NON EMPTY HEAD(NONEMPTYCROSSJOIN([Outlet].[H1].[Region].Members,[RandomRegion].[H1].[RandomRegion].Members),2000,SAMPLE) ON 1 FROM [HOLEFOODS]
4
0 1105
Question Samuel Claiborne · Nov 9, 2016

Hello. I'm just getting started in DeepSee, and am also a newbie in MDX.

I am looking to create a pivot table that will be used to drive a bar chart. The chart will have product classes across the bottom, and two bars per class: a calculated measure to derive Net Sales for the specified period last year, and a straight aggregation of a standard measure for the same period for this year. Ideally, this period can be chosen by the user via filters on the dashboard, and it could be week, month, or quarter. So, obviously, it's the calculated field (and perhaps the entire MDX query) I need help with.

4
0 592
Question Ashok S · Nov 30, 2016

Dear All,

From my web page, i am passing filter values to mdx query.

when mdx executes, i am getting Error #5001: Invalid member expression: empty name(2).

when i try the same in samples namespace (patient cube). I got the same error.

Below is my sample MDX from patients cube.

SELECT 
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT") 
ON 1 
FROM [PATIENTS] 
%FILTER %OR([HOMED].[H1].[ZIP].&[32000])

Result: 0   This works fine.

SELECT 
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT") 
ON 1 
FROM [PATIENTS] 
%FILTER %OR([HOMED].[H1].[ZIP].&[32006])

Result: 13   This works fine.

3
0 488
Question Benjamin Bryans · Nov 21, 2016

I currently have an MDX query/calculated measure as per the below:

 
[DaysOnListRange].[H1].[DaysOnListRange].&[Days 91 - 180]+ [DaysOnListRange].[H1].[DaysOnListRange].&[Days 181 - 365]+
[DaysOnListRange].[H1].[DaysOnListRange].&[Days 365+]

however it currently doesn't sum when there is a blank in the data.
How can I amend this query to include empty cells/only sum cells with data?

I've tried using nonempty but it doesn't appear to work in this context

2
0 453
Question Ashok S · Nov 2, 2016

Hi All,

I need some help to create mdx for the following scenario.


My source table is like this format

FileName AuditDate FileType FileStatus AuditStatus
A 20161102 20 open 0
A 20161101 20 read 1
A 20161031 20 write 0
A 20161030 20 close 1
B 20161102 40 open 1
C 20161101 45 read 1
D 20161031 40 read 1
E 20161031 20 open 0
E 20161102 40 read 1
F 20161102 45 read 1

When the user selects any Date in my application, Till selected date results are displayed for all filename.

My current MDX is

5
0 570
Question Rich Taylor · Dec 14, 2015

I need to create a KPI similar to the  DeepSee.Model.KPIs.DemoTrendLines kpi in Samples.  This kpi supports a scorecard widget with a trend line.  It shows patient counts by city with a trend line of the count of patients over a decade.  What I want is to show the trend line based on the average allergy score ([Measures].[Avg Test Score]).  A pivot table query that shows the data I would want to base the trend line on is:

SELECT NON EMPTY [BirthD].[H1].[Decade].Members ON 0,
NON EMPTY [HomeD].[H1].[City].Members ON 1 
FROM [Patients] %FILTER [Measures].[Avg Test Score]

Has anyone done this?

3
0 406
Question Alexandre Mosselar · Jul 11, 2016

I'm trying to calculate the percentage of the top level with the SUM function.
But I don't understand the PARENT behavior.
It does not work in any way!

SUM({FilialD.H1.Categoria.CURRENTMEMBER.PARENT.ALLMEMBERS},MEASURES.[Valor])

SUM({FilialD.H1.Categoria.CURRENTMEMBER.PARENT.%ALL},MEASURES.[Valor])

Someone could explain me the difference between %ALL and ALLMEMBERS?

2
0 568
Question Ashok S · Jul 12, 2016

Is there anything in deepsee where i can increase the cell width?

Column1

Column2

Column3

Sunday

100

200

300

Monday

100

200

300

Tueaday

200

300

400

By Default, based on the content, it calculates the cell width automatically.

From the above table i want to increase the width of weekdays cell particularly. Like below.

Column1

Column2

Column3

Sunday

100

200

300

Monday

100

200

300

Tueaday

200

300

400

I have written MDX Query in Kpi.

I tried with %Label with their arguments for cell style. It doesn't work for me.

Please give me some suggestions.

2
0 339
Question Blaise ZARKA · Jun 8, 2016

In DeepSee, having a customer account cube. The cube includes a time dimension AccountCreationDate.

How do you create a calculated measure to get the total number of accounts from the beginning to a certain date in abscissa ?

I tried many things including this:
AGGREGATE(%TIMERANGE([AccountCreationDate].[H1].[MonthYear].&[190001],[AccountCreationDate].[H1].[MonthYear].CURRENTMEMBER) ,[Measures].[%Count])

But I don't get the right result because the date in abscissa creates a filter on the first date.

I tried also with %MDX function, but then I loose the context for the CURRENTMEMBER.

2
0 945
Question Andre Luis · May 12, 2016

Hi all,

I have a dashboard which shows the growth of the months compared with the month from the last year.

The way I found to develop that, it was with a kpi. So, I overrode the %OnLoadKPI method with two mdx:

SELECT NON EMPTY [DataD].[H1].[MothYear].Members ON ROWS, [Measures].[CountVisits] ON COLUMNS FROM SubjectAtendimento %FILTER [DataD].[H1].[Year].&[2016]

SELECT NON EMPTY [DataD].[H1].[MonthYear].Members ON ROWS, [Measures].[CountVisits] ON COLUMNS FROM SubjectAtendimento %FILTER [DataD].[H1].[Year].&[2015]

5
0 494
Article Lydia Huang · Mar 14, 2016 4m read

The DeepSee Shell Best Practices Series - Example of using the MDX subquery flag in the DeepSee Shell

We have different flags for DeepSee advisors to look into the execution details and the methods DeepSee is using to do calculations.

flag [flagname] [on|off] – Turn a diagnostic on or off.

flag cmbr on|off – Show current member processing.

flag compound on|off – Show rewrite of compound queries.

flag crossjoin on|off – Show crossjoin processing.

flag relations on|off – Show relationship processing.

flag rewrite on|off – Show rewrite of query.

flag subquery on|off – Show subquery processing.

0
0 545
Article Lydia Huang · Mar 14, 2016 3m read

The DeepSee Shell best Practices Series - Execute an MDX query in the DeepSee Shell with/without  results cache

This cache is different from cache reset. Cache reset clears everything in the namespace but “cache off” only clears the cache in ^DeepSee.Cache.Results and ^DeepSee.Cache.Axis global node for the corresponding cube. The difference is quite smaller in the case as below, but in some cases it can be a big difference.

0
0 506
Article Lydia Huang · Mar 14, 2016 3m read

The DeepSee Shell Best Practices Series - Reset your DeepSee cache in the DeepSee Shell

This method is provided as a convenience for developers for use on development or test systems. You should not use this method on production systems as it will have immediate effect on the performance of end user operations.

  • Stops all DeepSee background agents
  • Clears any pending tasks
  • Clears the result cache for the current namespace.
  • If you use “reset 1”, then the cell cache for the current namespace is also cleared.  

>>reset 0

0
0 491
Question Amir Samary · Dec 14, 2015

Hi!
I am working on a project and I am facing a weird problem. I have created an MDX using Analyzer. This MDX executes very fast. I am trying to automate its execution with %DeepSee.ResultSet and the query never returns:

Set tSC = oMDX.%PrepareMDX(tMDX)
Quit:$System.Status.IsError(tSC)

Set tSC = oMDX.%Execute()
Quit:$System.Status.IsError(tSC)

What could be causing %Execute() to take so long to run while Analyzer is responding fast?

2
0 411