Data source to ssas cube naming and numbering changing? - ssas

Our ssas cube transform both the language and the numbering from the original data source.
In our database our datetime view all cells containing "monday" as its "day name" attribute has the value "1" in its "day of the week" attribute.
Screenshot from ssms
But once this database containing this view is loaded into the ssas cube then the language is suddently changed from english to norwegian (Monday -> Mandag) and monday is now suddently the 7'th day in the week instead of 1st.
Screenshot from visual studio opening the cube bim
I have had a look at "translations" but nothing is selected - but somewhere it got to be changed since its changed within the cube?

Analysis Services has a feature for metadata translations (eg table and column names), but not for data translations.
Translated strings are for object metadata only (names and
descriptions of tables and columns) that appear in a client tool like
an Excel PivotTable list. To use translated strings, the client
connection specifies the culture. In the Analysis in Excel feature,
you can choose the language from a drop-down list. For other tools,
you might need to specify the culture in the connection string.
This feature is not intended loading translated data into a model. If
you want to load translated data values, you should develop a
processing strategy that includes extracting translated strings from a
data source that provides them.
Translations in Tabular Models
So that's happening outside of SSAS.
Your database view probably returns data based on the connection's locale. EG this
set language norwegian
select datename(dw,getdate())
outputs
Changed language setting to Norsk.
------------------------------
torsdag
(1 row affected)

Related

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/

Does SSRS Report Builder always default date to MM/dd/yyyy?

I am setting up some reports on report builder and the date format always shows as MM/dd/yyyy, I want the format to be dd/MM/yyyy. I have checked the language of the server, database and user and they are all set to British English, I know this can be changed at report level however I am hoping to give end users the ability to create reports and not have to change this on each report. Is there anything I can set so this is always set to British English format or does report builder always show in American format?
I know this question is posted quite a lot but from what I have seen this is always about changing the format at report level but I want to change the default.
Thanks
If you want to display according to client's datetime format then you have to specify in Language property of Report.
Set =User!Language in Language property under localization tab of Report properties
What I do is instead of starting from a blank report each time I have a Basic Report Template file saved in a folder on the reporting server that end users can access. This report is blank except for the basic formatting that is applied to pretty much every report (start and end date parameters, common datasource, company logo and basic report properties including language)
Altering this template functionally alters the defaults as no one is using the blank new file they are all loading the basic template and modifying from there. This way you can set the language property to en-GB save the template and voila! Dates should now be dd/MM/yyyy.
If you don't have a common report server you can create the basic template and save it as an .rdl file which you can send to your colleagues to use instead of the default blank file.
If you look at the date formats in Report Builder, you will notice that the first set of them have asterisks. These formats will change with the regional settings of the report. In the report properties, set the language to =User!Language. We use these settings, and everyone gets the format they expect.
you could amend the dataset to change the date format.
SELECT CONVERT(DATETIME, 'your date column', 103);
This largely depends on your server locale/ regional settings. Once you fix that on the SSRS server side, you will not have to do that each time anymore.

Format Date for a Dimension in Cube

I have a SQL Server Analysis Service OLAP cube where one of the dimension fields, is a datetime field. This is not a Date Dimension (Like the ones that can be generated.). This represents a month end period for the data. It can be filtered for example to see the end of year 2013.
The problem is the sql server data field is a datetime field, other than changing the type to just date, how can I change the format to exclude the time? Basically; MM/DD/YYYY.
Measures seem to have the ability to be formatted (Currency for example), but not Dimensions.
I looked at the view, but there's not formatting options their either. Maybe I need to look at the view code and add sql formatting code there?
Excel: I can't change the format on the cells in Excel either.
Try to format the Dimension Attribute field in your view first. Example:
FORMAT(hub.DateAlternateKey,'MM/dd/yyyy','en-US') AS DateAlternateKey
Then you should go under attribute properties of your Date Dimension's Day Attribute and set NameColumn=DateAlternateKey. This attribute should be set to Type=Date.

Sharepoint 2010 Enterprise (PerformancePoint) KPI using multiple data sources

Sharepoint 2010 Enterprise (PerformancePoint) KPI using multiple data sources
I am attempting to create a KPI that uses multiple data sources, with the “actual” data coming from an analysis services cube, and the “target” data coming from either a sharepoint list or excel services data source.
The setup is dead easy, adding multiple data sources etc. The problem comes trying to get the two data sources to correctly apply dimension or time filters.
Basically if my Excel Services data columns source looks like this:
| Date | Area | Target |
All that happens when the target data source is specified is the entire list gets summed up and put against every cell. So if the scorecard is showing area (a dimension) on rows, and a date on columns, whatever the sum total of my targets (summed on date and area) is listed as the target on every single row (and every date).
It seems to me that the dimensions specified in the actual KPI section (and the scorecard) don’t map to the other data source.
I’m wondering is what I’m trying to do possible? It seems like a great idea – the result would be management would have a really easy spread sheet they can access through sharepoint, modify targets and then save and have it updated across all the relevant KPIs.
What is the common solution for this? Do you have to get the target data into the same AS cube?

Changing currency symbol in SQL Reporting 2005

I'm using SQL Reporting 2005. I'm formatting a currency in a cell using
Format(Fields!NetPrice.Value, "C")
but the format is coming out
$10.00
I want pounds so
£10.00
Can someone tell me where is the setting to do this. I've looked and google and can't find it. Is it obvious? I want to set it on the report level if possible and not alter SQL Server settings due to minimise impact elsewhere.
I could cast the currency to a string and add "£" I guess but I want to do it properly.
You shouldn't need to manually edit the RDL file. I guess you couldn't see the language section as you didn't have the report selected.
To see the report properties click on the background behind the outline of the report (the yellow section) and check the properties window or select 'Report' from the drop down when viewing the properties window.
By default, formats for date, currency, and numbers are determined by the report server language at run time.
To override the formatting provided through the report server language, you can set the Language property within the report when you design it. This can be set at the report level or the TextRun level. If you want to vary the formatting based on the language or local settings of the browser or client application, you can set the Language property to an expression that includes the User!Language variable.
This info was provided HERE.
On the Report you can set the Language Property which is in the Localization section. You will place the language code like en-GB in this property. You can also do this at the field level too if you want. This should pick-up on your Regional and Language settings on your PC. If you want to override this or control this then you can simply set the report property accordingly.
If you set this property and then view the code of the report (RDL) you will see this towards the very bottom:
<Language>en-GB</Language>
This information will be used for currency, date, and numeric conversions.