Dimension Attribute not showing up in Business Intelligence Dev Studio - sql

So I have a database schema and now I need to create a Cube for Analysis Services. I am, however, having an issue with one of the columns.
Here is what I did:
1. Create the Data Source
2. Create the Data Source View
3. Create dimensions, and this is where the problem is...
So my database has 10 tables and most of them work fine except for one. One table 'CustomerSatisfaction' has the columns 'year' 'quarter' 'customerSatisfactionValue' and 'productID'. Now when I create dimensions from this table I can't see the 'quater' column.
Basically I use the create dimension wizard but on the 'Select Dimension Attributes' section of the wizard I can't see the 'quarter' column. Any ideas why this is? I really want 'quarter' to be an attribute but it doesn't seem to be working...
Thanks for any help!

Is quarter listed as a column in the data source view?
If so, open up the dimension designer and drag the attribute from the data source view (on the right) to the attribute list (left).
If not, you'll need to fix the dimension query / refresh the table column listing in the data source view.

Related

SSIS Mapping and Transformation

I'm new to building SSIS packages, in fact this is my first package. I need to pull data from one DB view on Azure managed instance to an SQL on prem. I have built out the data flow and all. I'm moving data from a database view into a another database table but the destination table has a column that the source doesn't have hence my destination mapping view looks like (See attached image) How do I fix this or what are my options?
If this columns needs to stay empty in the source and you don't have it in source your best and only option is leave it like this. It basically needs to ignore it so no information will be fed. That will work.
In case you need information as current date you can add derivied column box in between your source and destination in your Data Flow where you can add current date or more columns that come from variable for example.
Its self explanatory that ignore(optional) means mapping for those columns can be ignored and if you want columns to be mapped with any calculated column you can do it by using derived column SSIS component Reference
As per your use case,try to use OLD DB component instead of ADO.NET component
to optimize performance for a relatively large data set

how to create table in SSAS tabular cube in Visual Studio

How can I create an empty table in a SSAS tabular cube? I don't want this empty table to be a calculated table. And, I don't want to import an empty table from SQL Server. I'm working in Visual Studio 2019, with the Microsoft Analysis Services Projects extension installed.
Pull in data in Power Query, then remove all rows then all columns. Here's an example using my date dimension.
let
Source=#"CSV Calendar csv",
#"Filtered Rows" = Table.SelectRows(Source, each [DateKey] = #date(1111, 1, 1)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"DateKey", "DateInt", "YearKey", "QuarterOfYear", "MonthOfYear", "DayOfMonth", "MonthName", "MonthInCalendar", "QuarterInCalendar", "DayOfWeekName", "DayInWeek", "MonthYear", "SortColumn", "AcctWorkDays", "HolidayWorkday"})
in
#"Removed Columns"
It's a bad idea if you are using Visual Studio for the model. You can't add measures, nor update them if they are there. The blue selected cell in the grid is in the "Add Column" column and is not editable.
The only way I know to get a measure on this table is to add a column to enable the grid, then you can add a measure, and then you can delete the column. That all works, but then I got the displayed message:
I think this might be what you're looking for. As far as I know, you need at least one existing DataSource to add a table, but then the table doesn't need to refer to it. In this example, I just added a local text file. Then right click it and and choose Import New Tables. This will pop open Power Query pointed at the DataSource.
In the formula bar, you can change the formula to = Table.FromRecords({},{"Column1"}):

SSAS Tabular Model - Add column to existing table

I am using VS2019 for SSAS Tabular Model development. Have imported a table from a CSV. The source CSV has undergone a change(new column has been added). When I process my table in VS2019, it gets processed successfully. However I am unable to see the new column introduced in source CSV. I went to Table properties and did a Refresh Preview but was not able to see the new column. Closed and re-started solution, re-processed the table but no luck! I remember in VS2017 we used to add the column by going into table properties and selecting the new column but things seem to be different in VS2019. Any help would be appreciated.
I'm assuming you used Get Data / Power Query to import the CSV. This unfortunately generates a Power Query Csv.Document function call that includes the number of columns when the query was generated. This parameter isn't exposed through the usual Power Query UI.
If you use the Advanced Editor or turn on the Formula Bar (view menu), you will see a parameter like Columns=10, was generated, usually in your Source step.
It currently seems safe to delete that parameter by editing the code - it will then always pull back all columns presented. Or if you prefer, you can edit the number of columns, as described in this blog post:
https://prathy.com/2016/08/how-to-add-extra-columns-to-an-existing-power-bi-file-which-using-csv-data-source/

no relation between a fact table with date attribute and dim date

I have a cube with several fact tables and a dim date. The fact tables have date fields but when I try to deploy, deployment fails because there is no relation between the fact table and any dimensions. Also when I check my dimension usage I don't see any relations detected. I don't understand why the fact table date attributes are not "relating" to the dim date.
When I look within the data source view I see a relationship between the date fields in my fact tables and dim date but no relation in the cube, where should I look to fix it?
You have to check their connection inside the Dimension Usage (2nd tab of a Analysis project). At this point you have to state the relationships between facts and dimensions.
From the solution, double click cubename, then go to dimension usage tab, if you don't see date dimension there, right click somewhere and say add and then follow wizard...

How to refresh a cube in SSAS, after making change to database

I made change to database, only changed datatypes from int to money.. But I can't make it appear in my cube, it is still unchanged. But if I create new cube, it is OK. But I don't want to create new cubes every time I change something in database...
Some know how do refresh the cube? Thanks
You need to first refresh your Data Source View, then edit wherever you are using that column in cubes or dimensions.
if you right click on your project containing your cube and then select "Process", cube will be processed and the data in the cube will be updated with the data on database .