SSAS 2012 cube browser- how can I create columns from dimensions? - ssas

I am new to SSAS, and have created a cube in SSAS 2012.
When I browse the cube, I can easily at my dimensions as rows, but how do I add them as columns? In previous versions (I have access to a Cube created in 2008), when you browse the cube, you can drag dimensions into either columns or rows.
Have I setup my cube incorrectly?

In short: you can't any more, because the feature is no longer available. According to Chris Webb:
The cube browser has now disappeared from SSDT, and is replaced by the
control used by the SSRS query generator. This is because the old
browser used the OWC control which was deprecated years ago and
finally had to be replaced; it’s a massive step backwards because this
control is truly awful: for example you can no longer put anything
other than Measures on columns in your query.
You can confirm this by changing to design mode, and creating a simple MDX query with a dimension on the Columns axis:
SELECT
[Geography].[Country].[Country] ON COLUMNS
FROM [Adventure Works]
If I run this query in the SSAS browser, I get the error
Query preparation failed: ...The first axis [should not] reference any
dimension other than the Measures dimension"

I presume you mean the cube browser in BIDS/Visual Studio? This is generally a waste of time: it has poor functionality and regularly returns results that differ from other tools.
You would be better off using the same client tool your end users use. Excel 2010 / 2013 is pretty good.

Related

SSAS cube - ordering of measures and dimensions

I have inherited several cubes and have learned a bit through doing maintenance and updates to the cubes. One thing I don't understand is "ordering" for measures and dimensions. I use Visual Studio 2015 and 2017 in case it matters. In the dsv, the named queries are all listed in alphabetical order which is perfect. In the cube, however, the Measures and Dimensions are not shown in alphabetical order, and I also don't see an option to sort. Why is that? I have tried to find an answer, and it seems to be to manually drag things into the desired order. But every website I find that says this also has this cryptic statement: "The order will affect how certain client applications order these measures." Does anyone know what "certain client applications" refers to? Am I going to cause trouble for myself if I move the Measures and Dimensions around so they are in alphabetical order? There are a lot of dimensions, which is why I want to do this -- I waste so much time manually looking through the list of Dimensions (there are > 70), trying to find the one I want.
The cube also has many calculations (>60), which are also not ordered. Similar question there: could it be problematic if I change the ordering there?
The cube is used by Excel users as well as by dashboards.
Update: It's been many months now since I manually reordered my cube measures and dimensions. I have found no ill effects, even with calculations, and it makes it much easier to find things. To answer the question "why," it's because my cube has 13 measure groups and about 90 dimensions, and it makes it easier for me to find things while doing active development. Yes, the ordering is automatic for Excel users but it's not automatic for developers.

SSAS Tabular - the more measure i created, the more time it need to Visual Studio to created a new measure

Actually my issue is : the more measure i created, the more time it need to Visual Studio to created a new measure. (Visual Studio stay in not reponding)
The measures are not really complexe but actually it take thirty seconds~one minute to create a new measure (and i have around 50-100 measures actually).
The temporary solution i have actually is to create the measures in the code page but i was wondering about the scalabilty of ssas tabular if i have to create 100 measures again.
-My memory : 16 Go, 2,60GhZ i7.
-The data in the fact table is about ~50 thousand lines.
-I don't have other project open.
-SQL server 2016, the SQL Server has the latest build 2020-09-28 (build : 13.0.5850.14).
-i don't have build action and i don't backup the data to disk.
I was wondering if it's normal that visual studio take some times between the creation of each measure.
If you have some tips or advice don't hesitate to share :)
Maybe i should try to split my measure per Fact Tables instead of created in one measure table?
Maybe there are some parameters i can try to change?
Depending on a lot of things, like how the data looks (not only the number of rows in the fact table, but size etc), the hardware, network etc, I would say it's not very rare to experience some delays and slowness working with SSAS in visual studio when it starts loading data into the grids in the designer. As someone mentioned in the comments, there are third party alternatives for editing tabular models that doesn't have this behavior/functionality.
However, if you still want to use visual studio there are ways to possibly get around this. For example if you have a dedicated server/database for development purposes, where you have views as sources for the tables in the tabular model, you can add a TOP condition to the SELECT statement in the views to eliminate/limit the data loaded into visual studio during development.

SSAS tabular model slow

Hi i'm working on a large SSAS tabular model and it's so slow every time i change even the smallest thing it goes away and thinks about it for ages.
The model is massive and pretty sure that's the problem but I've inherited it like that so at the moment cant do anything about that.
Is there a way to stop SSAS loading all the data (or less data) while i'm developing the model in visual studio?
I encountered the same problem in my cube; apparently due to the hundreds of measures my model has. I tried the process clear method described by Vercelli but it did not help in my situation. To resolve this issue I did the following:
Open the project in VS
Go to Model in the Menu
Go to Calculation Options
Select Manual Calculation
This brought my time down from 7 - 10 minutes doing something as simple as hiding a measure to 3 to 5 seconds.
If you process-clear your workspace DB no data will appear on Visual Studio.
Navigate with SSMS to your workspace instance. The Database will appear as your tabular model followed by your userName and a GUID. Right-Click -> Process Database-> Process Clear.
Please try this with caution if your are not sure which DB you are processing.
PS: If your fact tables are partitioned, you can process-clear those and then process only some of the partitions in order to have some data to test.
There's nothing you can do about it for the time being - I'm in a similar situation and have searched far and wide for a solution!
What sometimes helps is if you delete the workspace files (the ones with the guid at the end) from the SSAS\data directory. Doing this deletes all the data in the local version of the model which will bring the file size a fair bit. I do it every now and then and find it does usually help - it still keeps the table structures and relationships etc
For big, mature models Visual Studio is not the best dev environment. Try to use Tabular Editor from GitHub created by Daniel Otyker. It's an editor that works in both on-line and off-line modes and is super fast. What's more, it lets you change things in bulk using either GUI or scripting via a bit of C# (nothing to be afraid of, though). There's a lot of documentation on GitHub and good examples that can very easily be customized. Also, Daniel has a video on YT that teaches how to use the editor to the best advantage. Hope this helps.
When building SSAS cubes with Visual Studio 2019 and you are having performance issues while maintaining the cube, for example, 3-8 minute long delays between modifications to the cube. The way to fix this issue is to Turn Off Automatic Calculation for the model and set the model calculation to Manual Calculation.
To change the calculation method, from the Visual Studio 2019 Enterprise SSDT main menu bar "Model", select "Calculation Options" and select "Manual".
As you can see, it allows toggling between "Automatic Calculation" and "Manual Calculation". If you select "Manual Calculation", then you have a menupad offering the option to "Calculate Now".

Analysis Service Hierarchy Aggregation

I've read through some documents on how to produce a hierarchy and use it for aggregration.
I have a dimension which I created to produce a hiearchy. Simple one. Two columns. And the drill down works. I did it in Visual Studio.
STAT | Management
STAT | Stat Adjustment
So that's all good, except Management and Stat Adjustment doesn't add up to a total "STAT".
How do I add the rules so that Management and Stat Adjustment adds to STAT?
I can't find the settings in Visual Studio. And no amount of reading told me how to do it either, just explained natural and unnatural hierarchy.
Measures define how your data will "add up", not Hierarchies. I would set the Measure property for AggregateFunction to Sum.
Note this can be overriden by the MDX calculation script.
Also I would not use the Visual Studio cube browser for testing - this is based on the OWC control that came out in 2003 and has numerous issues and bugs. The functionality is also extremely weak e.g. cant save a query or export the results. I would run all tests using the end-user query tool e.g. Excel.

how to hide a measure group in ssas 2005 for excel 2007

If I hide the measures in the measure group, the measure group will be invisible in cube browser in BIDS. But in excel 2007, it still shows the measure group with no measures but related dimensions. So any idea to hide the measure group in excel 2007? I guess this is client related since cube browser in BIDS is hiding the measure group.
update:
I googled and found I can set up a perspective to hide the measure group. But our's is standard edition, which does not support this feature...
This feature is not supported in SSAS.See this link by Raphael with more details about this. Raphael has also created a feature suggestion to ask the SSAS team to allow us to properly handle measure group visibility, so that reporting tools like excel know exactly how to behave when we want to hide a measure group. You can find the suggestion here.