SSAS Dimension not displaying values in rows in Cube Browser - sql

I am new to SSAS. Have added a new dimension to cube and when i see under members it shows the value of that columns but under browser section when i drag and drop the dimension it does not display anything

We need more information on what steps you took to get where you're at.
Do you have a relationship between the dimension and measure group?
Did you process the dimension, the cube?

I believe what is happening is that you haven't included a measure in the cube browser so it returned only the report dates which have a value for the "default measure". If you go to the first tab of the cube designer and right click on the cube node above the measure groups list on the left and choose Properties you will see a DefaultMeasure property. You can set that property to choose the measure which is the "default measure" when a user doesn't specify a measure in their report.
However I would recommend just dragging a measure into the cube browser to explicitly tell it to show report dates that have a value in that measure.
I also prefer not setting the DefaultMeasure property and adding the following to the MDX script so that the default measure is always null. That forces users to explicitly add a measure to their pivot so it is clear what they want.
CREATE MEMBER CURRENTCUBE.[Measures].[NullCalc] as NULL
,VISIBLE=0;
ALTER CUBE CURRENTCUBE UPDATE DIMENSION Measures, DEFAULT_MEMBER=[Measures].[NullCalc];

Related

ssas cube not showing all dimension members

Do you have any clues why excel is presenting more dimention members when i add measures to grid?
When there is no measure selected then there is for example 3 members visible, when I add some measure then there is 5 and with next measure there is 6 dimention members visible. All measures are non empty - there are some values. Can it be some excel setting or dimention?
I have not yet checked the mdx query from excel to the cube.
I've found that there is default member when no measure is selected so setting it will give answer for first case. In production env there is plenty of measures and without explicit setting, default is first measure from first group so it can have different nonempty set than other measure when sliced by given dimention.
But I cant figure out why adding second measure to grid also generates larger dimension member list - measures have values on every row.
I've found there can be cache problem in such case.
Excel is not key I think, in SSMS you can reproduce too.
First case - no measure -> one measure.
When no measure is selected there is deafault used by SSAS.
Deafault cube measure can be checked by:
SELECT NON EMPTY { [Measures].DefaultMember } ON COLUMNS
Changing default as null = no members in rows:
CREATE MEMBER CURRENTCUBE.MEASURES.UseAsDefaultMeasure AS NULL, VISIBLE = 1;
ALTER CUBE CURRENTCUBE UPDATE DIMENSION Measures, DEFAULT_MEMBER = [Measures].UseAsDefaultMeasure;
Changing as 0= all members in rows:
CREATE MEMBER CURRENTCUBE.MEASURES.UseAsDefaultMeasure AS 0, VISIBLE = 1;
ALTER CUBE CURRENTCUBE UPDATE DIMENSION Measures, DEFAULT_MEMBER = [Measures].UseAsDefaultMeasure;
Or you can set any other measure.
Second case - one measure -> two measures.
NON EMPTY is default excel setting in MDX queries so in my case there was overlooked 2 rows without first measure value, so empty members were eliminated. All values are set for second measure so new rows appeared.
So everything works as designed.

MDX - Dimension on rows and Measure and a Dimension on Columns

I am now adding to something I am writing and need to offer the user the ability to place dimensions and measures on either the rows or columns.
I am about to test an idea to make the MDX for the example in the picture but realised I should also ask any MDX experts too!
So how would one go about pulling off this sort of layout? I cannot view the MDX generated by this Excel (data redacted due to being on site somewhere, also why I cannot download addins for MDX generator etc)
I actually did manage to get the OLAP extension addin installed.
https://github.com/OlapPivotTableExtensions/OlapPivotTableExtensions/releases/tag/v0.8.4
This will help me add some stuff to my MDX generator and prove invaluable as you can see the MDX Excel generates.
SELECT NON EMPTY Hierarchize(AddCalculatedMembers({DrilldownLevel({[Ccy].[Ccy].[ALL].[AllMember]})})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS , NON EMPTY Hierarchize(AddCalculatedMembers({DrilldownLevel({[Book].[Book].[ALL].[AllMember]})})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON ROWS FROM [TraderCube] WHERE ([Date].[Date].[ALL].[AllMember].[2019-12-12],[Measures].[JTD.SUM]) CELL PROPERTIES VALUE

Show SSAS dimension attribute in Excel pivot table "More Fields"

I have an existing dimension in the SSAS cube and when I connect to the cube by Pivot table in Excel, I see that dimension, and I see hierarchy underneath , and underneath of that I see ...MoreFields, and some attributes of the dimension are shown here, but I cannot figure it out, what property to set in SSAS cube project to show/hide this fields?
Go to dimension tab, right click on your attribute. Set the attribute hierarchy visible to false. This will stop your attribute from being visible.

Calculated Member in SSAS filter by dimension

I have attached an image of a report based on a SSAS cube that I have created so far. I want to create a "Calculated Member" (Confirmed Current Count") in my cube that basically combines the "Confirmed~~" measure with the "Current" member of the "As of Day" dimension. This way, I will be able to show a couple of other measure. Please see the second screenshot on what I have so far. However, BIDS is telling me that the syntax for SCOPE is incorrect. What am I doing wrong? Should I be doing this differently?
This is an issue of the user interface: It allows you to only enter one statement into the "Expression" box. But you entered five. You would have to enter each SCOPE and END SCOPE, as well as the assignment to This into a separate calculation.
It may be easier to enter this type of calculation in Script view, where you see the complete calculation script as one long text, and not each statement in a separate dialog. You can switch between these views with a button in the toolbar.

SSAS Cube Excel Pivot Table Hide Fields

How do i hide an attribute from appearing as a field when creating a pivot table.
e.g. i dont want the user to see the PK of a dimension. Thanks
Within SSAS, set teh AttributeHierarchyVisible value to false on the value of the dimension that you wish to hide from client tools. You will find this property available on each of the dimensions attributes.