Josh,
So you want to display a number in millions (i.e. $2,123,456 as $2.12) on an SSRS report, perhaps as a data label on a chart.
Here is the format expression to do so as well as for Thousands and Billions.
Josh, you learned something cool or figured something difficult out relating to BI/SQL/C#/Programming/Etc. Therefore write it down here for easy recall!!!
Thursday, May 29, 2014
Wednesday, May 28, 2014
SSAS Binding Too Small
Josh,
So you've updated some tables used in a cube by increasing a column's length. When you go to process the cube you are getting an error like "Errors in the back-end database access module. The size specified for a binding was too small, resulting in one or more column values being truncated."
Seems easy enough, right? You just need to increase the Dimension Attribute's length. Make sure you do it for both the NameColumn and KeyColumns sections:
Thanks to http://shahfaisalmuhammed.blogspot.com/2012/03/size-specified-for-binding-too-small.html
So you've updated some tables used in a cube by increasing a column's length. When you go to process the cube you are getting an error like "Errors in the back-end database access module. The size specified for a binding was too small, resulting in one or more column values being truncated."
Seems easy enough, right? You just need to increase the Dimension Attribute's length. Make sure you do it for both the NameColumn and KeyColumns sections:
Thanks to http://shahfaisalmuhammed.blogspot.com/2012/03/size-specified-for-binding-too-small.html
Tuesday, May 13, 2014
Maximum Column Content Lengths
Josh,
So you are working on loading data into a table from another table and you're getting truncation errors. To keep the destination table as small as possible for speed, you need to find out which column is causing the truncation error and how much you need to increase the destination columns size.
Let's use the handy SYS schema to help us out...
So you are working on loading data into a table from another table and you're getting truncation errors. To keep the destination table as small as possible for speed, you need to find out which column is causing the truncation error and how much you need to increase the destination columns size.
Let's use the handy SYS schema to help us out...
Thursday, May 8, 2014
MDX Calculated Member Check if Measure is Null
Josh,
So you want to create a count of a measure when it is not null. To do so in MDX, you can do the following:
So you want to create a count of a measure when it is not null. To do so in MDX, you can do the following:
WITH Member [Measures].[Count of Non Null]
AS
IIF(ISEMPTY([Measures].[Might Be Null - Avg]), NULL, 1)
SELECT
NON EMPTY
{
[Measures].[Might Be Null - Avg],
[Measures].[Count of Non Null]
} ON COLUMNS,
NON EMPTY
{
[Dim Date].[Fiscal Quarter].[Fiscal Quarter].ALLMEMBERS
} ON ROWS
FROM
[MyCube]
Tuesday, May 6, 2014
SQL Format Function
Josh,
If you need a date/time in a format other than the standard ones covered by the CONVERT function, try out the FORMAT function:
This will turn a date/time like "2014-04-24 14:38:13.0000000" into "2014-04-24".
If you need a date/time in a format other than the standard ones covered by the CONVERT function, try out the FORMAT function:
SELECT
FORMAT(@SomeDateTime, 'yyyy-MM-dd') AS FormattedDateTime
This will turn a date/time like "2014-04-24 14:38:13.0000000" into "2014-04-24".
Subscribe to:
Posts (Atom)