Quantcast
Channel: SQL Server Analysis Services forum
Viewing all 14337 articles
Browse latest View live

Average sales amount based on date range dynamically

$
0
0


I have Date dimension and Customer dimensions. Also i have Sale amount Measure.

As per user In SSAS Browser, we need to create with new measure of Average of Sale amount as per the date. 

For example if user selected/Filtered for particular two or three days it has to display average of those two days or three days AverageSaleAmount respectively. If user select/filtered date range per month it has to display month average.

Can you please suggest.


Sudhan


SSAS cube Calculation for time to date

$
0
0

Hi Folks, 

We have a measure Called NumberOfOrders we need to calculate the measure on date.  Which is the Calculated measure 

I have used the below Expression, but In Excel Pivot Report if I applied the filters which measure isn't working. 

Any ideas please!

Expression:

IIF ( NOT ([Date].[Fiscal Year - Month].CurrentMember IS [Date].[Fiscal Year - Month].DefaultMember),
SUM(NULL:[Date].[Fiscal Year - Month].CurrentMember, ([Measures].[NumberOfOrders])),
IIF (NOT( [Date].[Calendar Year - Month].CurrentMember IS [Date].[Calendar Year - Month].DefaultMember),
SUM(NULL:[Date].[Calendar Year - Month].CurrentMember, ([Measures].[NumberOfOrders])),
IIF(NOT([Date].[Fiscal Year - Week].CurrentMember IS [Date].[Fiscal Year - Week].DefaultMember),
SUM(NULL:[Date].[Fiscal Year - Week].CurrentMember, ([Measures].[NumberOfOrders])),
IIF(NOT([Date].[Fiscal Calendar].CurrentMember IS [Date].[Fiscal Calendar].DefaultMember),
SUM(NULL:[Date].[Fiscal Calendar].CurrentMember, ([Measures].[NumberOfOrders])),
SUM(NULL:[Date].[Calendar Date].CurrentMember, ([Measures].[NumberOfOrders]))
)
)
)
)

To reduce cube processing time , I am looking for an alternative, for while loop and replace functions to eliminate text between and replace few characters

$
0
0
Location:
india
<article>

Hi friends,

The below code eliminates text between <> angular brackets, 
and replces &amp; with &
&quot; with "
&lt; with <
&gt; with >
and removes text between < >

But this id taking very long time to process cube, I am looking for any alternative for this.
please suggest

create or replace FUNCTION format_data
(pstr IN CLOB)

RETURN CLOB
AS

vstr_in CLOB := p_str;
vstr_out CLOB;

BEGIN
WHILE INSTR (vstr_in, '>') > 0 LOOP
v_string_out := vstr_out
|| SUBSTR (vstr_in, 1, INSTR (vstr_in, '<') - 1);
v_string_in := SUBSTR (vstr_in, INSTR (vstr_in, '>') + 1);
END LOOP;
vstr_out := v_string_out || v_string_in;
vstr_out := REPLACE (vstr_out,'&amp;','&'); 
vstr_out := REPLACE (vstr_out,'&quot;','"');
vstr_out := REPLACE (vstr_out,'&lt;','<');
vstr_out := REPLACE (vstr_out,'&gt;','>');

RETURN vstr_out;
END format_data;

eg- 
jack &amp; jill &lt; eliminate this txt &gt; , went up the &quot; hill &quot; to fetch a pail of water , jack fell down<oh no --eliminate> &amp; broke his leg &amp; jill came tumbling &lt; no &gt; <comments> after &quot; haha &quot;'

should be formatted as -

jack & jill , went up the " hill " to fetch a pail of water , jack fell down & broke his leg & jill came tumbling after " haha "

Thank you

</article>

sania

SQL Temporal Tables Begin and End Date

$
0
0
We want to implement temporal tables in SQL Server 2016. We are creating a Datawarehouse and developing Type 2 Slowly changing Dimension Tables.

For our BeginDate and EndDate, we want them to be date, not datetime. Always on beginning of date. So if table changes at 5/3/2018 2:30pm,  SQL Temporal tables will automatically will place datetime, however, we just want date 5/3/2018. Is there anyway to only implement dates, without using Views (which convert the datetime to date), and without modifying/updating the Temporal history table? Is there a property or setting to only use regular date? If no other options, what is best out of the two, views or updating temporal history table?

    CREATE TABLE dbo.Department
    (
        DeptID INT NOT NULL PRIMARY KEY CLUSTERED,
        DeptName VARCHAR(50) NOT NULL,
        ManagerID INT NULL,
        ParentDeptID INT NULL,
        SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START
          CONSTRAINT DF_Department_SysStartTime DEFAULT SYSUTCDATETIME() NOT NULL,
        SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END
          CONSTRAINT DF_Department_SysEndTime 
      DEFAULT CONVERT( DATETIME2, '9999-12-31 23:59:59' ) NOT NULL,
        PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime)
    )
    WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.DepartmentHistory));

SQL Temporal Table dependent on transaction date and not currentdate getdate

$
0
0
We want to implement temporal tables in SQL Server 2016. We are creating a Datawarehouse and developing Type 2 Slowly changing Dimension Tables.

For the BeginDate, we want it to be dependent on transaction date and not the current getdate time. We are reprocessing a history of transactions. Example below, customer has gym or bank status, and goes from inactive, to active, or pending, dependent on transaction date.

    CREATE TABLE dbo.Department
    (
        CustomerId int primary key,
        MembershipStatus int,
        TransactionDate datetime
     )

**Would like to create table like this:**

    CREATE TABLE dbo.DepartmentHistory
    (
        CustomerId int primary key,
        MembershipStatus int,
        TransactionDate datetime,
        BeginDatetime datetime,
        EndDatettime datetime

     )'

So first customertransaction is on 3/5/2018 as Pending P

Second transaction is 4/21/2018 is Active A


(not sure how to write table in msdn)

CustomerId,Status,BeginDate,EndDate

1, P, 3/5/2018, NULL
  


CustomerId,Status,BeginDate,EndDate

1, P, 3/5/2018, 4/21/2018

1, A, 4/21/2018, NULL


SQL Temporal Tables Include the Current State

$
0
0
We want to implement temporal tables in SQL Server 2016. We are creating a Data Warehouse and developing Type 2 Slowly changing Dimension Tables.

We noticed the History Tables, only include history. We want to create a table which has history And Current State (with EndDate being Null or 12/31/9999).
Is there any way to conduct this, without creating a view to conduct Union of Current and History Table? 

If I have to go with Union view, did sql server optimize interals, so there would not be any performance issue, for a 50 million rows? I have to give the datawarehouse to customers and executive management, there should not be any noticeable difference.


     CREATE TABLE dbo.Department
        (
            DeptID INT NOT NULL PRIMARY KEY CLUSTERED,
            DeptName VARCHAR(50) NOT NULL,
            ManagerID INT NULL,
            ParentDeptID INT NULL,
            SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START
              CONSTRAINT DF_Department_SysStartTime DEFAULT SYSUTCDATETIME() NOT NULL,
            SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END
              CONSTRAINT DF_Department_SysEndTime 
          DEFAULT CONVERT( DATETIME2, '9999-12-31 23:59:59' ) NOT NULL,
            PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime)
        )
        WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.DepartmentHistory));

consistent biz rules between sql engine and ssas tabular

$
0
0
Hi. We run 2016 enterprise. I'm wondering if there is a way to maintain consistency between t-sql procs or perhaps funcs or perhaps views and dax expressions in ssas tabular. We have a number of calculations that sum x and divide by sum of y. Wouldn't it be great if the user can feel comfortable he/she is getting the same calculation whether resorting to the engine for one off analyses or the cube where it suits his needs? I know by its nature a tabular cube wants to aggregate whereas a t-sql query would need to be told so but I thought i'd ask. 

Cannot see the change setting when i try to process my dimension

$
0
0

Hi All previously when i used 2008 BIDS i could see the change settings to custom process my dims, like ignore the duplicate key errors, now i cannot see the settings. The current version i am using is

Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Professional

Microsoft Visual Studio Tools for Applications 2015   00322-40000-00000-AA509
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-40000-00000-AA509
Microsoft Visual Basic 2015


Visual C# 2015   00322-40000-00000-AA509
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA509
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   7.0.20622.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   2.5.6.4958
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Analysis Services   14.0.1016.232
Microsoft SQL Server Analysis Services Designer 
Version 14.0.1016.232

SQL Server Data Tools   14.0.61712.050
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 14.0.1000.169

SQL Server Reporting Services   14.0.1016.232
Microsoft SQL Server Reporting Services Designers 
Version 14.0.1016.232

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

I am attaching what i am seeing when i click on the process the dimesnions. Please suggest, is there a patch.

Thanks


Unknown handling

$
0
0

I have a fact table and a dimension that are link via say account id. 

My dimension processes and I can browse it. But the fact has account id's that are not in the dimension 

I have 2 dimensions based or build from SQL views. The views are a subset of accounts say account type = Income is one view and one dimension and the other view would be account type = GPM with it's own dimension.

so the fact data with account id would be in one of the 2 dimensions. 

I want to be able to see all the GPM dimension members with fact data and if there isn't a member it would appear in the unknown member. I have set up the fact to KeyNotFound = Ignore 

the dimension GPM has NUllProcessing = UnknownMember 

when I browse the cube I only see a value next to Unknown and the other members of the dimension don't appear but I know they have links into the fact data. When I run a query in sql and join the fact and dimension via account id I get rows. 

in excel I get this

Scenario NameAll
Row LabelsValue
unknows12345
Grand Total12345


TOTALYTD is not working as expected in SSAS tabular cubes

$
0
0

HI 

i am trying to create a measure in one of our tabular cube to calculate YTD for Total balance. This is the function i am using for that. 

TOTALYTD(SUM(TOT_BAL), 'Trasaction'[Transaction Date]) 

The date key we are getting from FACT table is numeric and it is joined to DATE dimension and I am using the date column from Date dimension table in the TOTALYTD function. 

Everything is working to be fine but the total YTD caluculation is getting started from 12/31 of the prev year itself. for example.

Date                TOT_BAL    TOT_BAL_YTD      EXPECTED_YTD

1/10/2017       2000               2000               2000

2/10/2017        5000              7000               7000

12/10/2017        0                  7000               7000

12/31/2017        0                    5000              7000

1/1/2018         5000              5000                 5000

The 12/31/2017 date should have 7000 but it is taking next year first value as bal amount. 

Can some let me know how to resolve this issue.


hemanth

MDX with YTD and PARALLELPERIOD slow?

$
0
0

Hi,

I am running the following MDX query and I think the query runs slow, it takes 8 seconds for 28462 rows and 9 columns.
The raw fact data is about 1.000.000 rows containing data on a monthly base over two years (24 months).

According to my SQL Profile trace the formula engine takes 99% of the time to execute, the storage engine only 1%.

I allready did the following:

1. Usage Based Optimization Aggregation and checked if the aggregation is used in SQL Profiler (this is the case).
2. Tried to rewrite the MDX in differente way's.
3. Set NON EMPTY BEHAVIOR on the calculated measure.
4. Checked the configratution of my DateTime dimension
5. Checked attribute relationships

According to this article: https://sqldusty.com/2014/03/07/do-you-know-why-your-mdx-query-is-slow/ my MDX query is not optimal because the formula engine takes most of the time calculating the results.
At the moment I don't know why it's taking 8 seconds and what I can do to improve the performance.
The query should run withing preferably <= 3 seconds so the SSRS reports is available within an acceptable time.

The server has 4 vCores + 24GB Memory.

MDX Query

SELECT NON EMPTY
    {
        [Measures].[Aantal Prognose t/m], --YTD Measure
        [Measures].[Omzet Prognose t/m], --YTD Measure
        [Measures].[Aantal Prognose Vorig Jaar t/m], --PARALLELPERIOD Measure
        [Measures].[Omzet Prognose Vorig Jaar t/m] --PARALLELPERIOD Measure

    }
On 0,
NON EMPTY
    [Opendatum].[H - Openjaar - Openperiode].[Openperiode Omschrijving]
    *
    [Specialisme].[Specialisme].[Specialisme].Members
    *
    [Zorgactiviteit].[H - Tarieftypegroep - Tarieftype - Declaratie].[Declaratie].Members
    *
    [Zorgproduct].[Zorgproduct].[Zorgproduct].Members
    *
    [DBCDiagnose].[H - Diagnosegroep - Diagnose].[Diagnose].Members

ON 1
FROM Productie
WHERE
([Opendatum].[Openjaar Periode Nummer].&[201808],[Omzetprognosegroep].[Omzetprognose Groep1].&[Overige productie])

Defintion of the measures used in the MDX query:

Measure: "Aantal prognose t/m"

AGGREGATE(YTD([Opendatum].[H - Openjaar - Openperiode - Opendatum].CurrentMember), [Measures].[Aantal Prognose])

Measure: "Omzet prognose t/m"

AGGREGATE(YTD([Opendatum].[H - Openjaar - Openperiode - Opendatum].CurrentMember), [Measures].[Omzet Prognose])

Measure: "Aantal Prognose Vorig Jaar t/m"

(PARALLELPERIOD([Opendatum].[H - Openjaar - Openperiode - Opendatum].[Openjaar],1,[Opendatum].[H - Openjaar - Openperiode - Opendatum]),[Measures].[Aantal Prognose t/m])

Measure: "Omzet Prognose Vorig Jaar t/m"

(PARALLELPERIOD([Opendatum].[H - Openjaar - Openperiode - Opendatum].[Openjaar],1,[Opendatum].[H - Openjaar - Openperiode - Opendatum]),[Measures].[Omzet Prognose t/m])

   

relationship/modeling question in SSAS Tabular (2014)

$
0
0

hello folks, I have what I think may be a fairly basic modeling question that the solution is eluding me and was hoping the experts in this forum may be able to lend a help.

I have the following

dimMember  with member_sk
factSales      with member_sk
bridgeReasons   with member_sk and SalesReason    (a member_sk may have many SalesReasons records).

I'd like to connect bridgeReasons in such a way that if I select one or more SalesReasons, all relevant dimMember and implicitly factSales records would be filtered.

not sure if this needs bi-directional relationships or an SSAS version beyond 2014.

thanks much for any pointers to any solutions or white papers,

Cos


cos

Where to find these properties in DSV: msdata:ReadOnly="true" and msprop:FriendlyName="AGEGROUP_ID?

$
0
0

Dear All,

I have updated a data source view of a cube solution with an updated (which contained couple of two new columns) and some of the properties of the some existing columns has changed in the code. I am not sure if I did somthing knowly.

Here are couple of examples:

Original  code:

<xs:element name="AGEGROUP_ID" msdata:ReadOnly="true" msprop:design-time-name="e21b0b4d-69da-4a06-bc7a-c7f9b8411077" msprop:DbColumnName="AGEGROUP_ID" msprop:FriendlyName="AGEGROUP_ID" type="xs:int" />

Updated code:

<xs:element name="AGEGROUP_ID"                         msprop:design-time-name="a2866c34-f3d7-4051-9647-adf092b10af2"  msprop:DbColumnName="AGEGROUP_ID"                    type="xs:int" minOccurs="0" />

Can anyone tell me, where can I find/change the follwoing properties in the GUI:?

msdata:ReadOnly="true"

msprop:FriendlyName="AGEGROUP_ID

Thanks in advance.

Best Regards,

Tahir


Thanks, TA

SSAS Tabular Translations and PBI Desktop, Excel don't work properly

$
0
0

Hi, i need help on SSAS translations not appearing on PBI Desktop and on Excel:

 

Context: Im in Portugal working for French company. I use PBI/Excel in a Windows VM with Regional Portuguese settings (i don't know if there is some French setup somewhere in the system), and developing in SSDT/SSAS in another Windows VM with Regional French settings.
As the language by default in SSDT is in this case fr-FR (with a bad mix of french/english attribute names used), it doesn't appear as option in Tabular translator tool (i think this is the reason), so i'm trying a clean French translation in pt-PT, so that i can test on my VM. Sorry, maybe too much information, but maybe the problem is somewhere in the settings...

 

So, I've used Tabular translator to create a clean French translation associated to the pt-PT "locale", but the translation didn't appear on the Excel on my system, i had to force the LocaleIdentifier=2070 (for Portugal) on the Excel connection and then it appeared with the changes. Though this is not Excel forum, does someone know or have any idea why do i have to force the LocaleIdentifier?Basically, if i don't force this attribute on the  connection on Excel, translations don't work.

 

In PBI Desktop, the same is happening - I can't see the translations associated to my language, and as i'm connected to a SSAS tabular, i can't change the settings in the PBI report file...how can i change them????

  

Thank you and best regards.

MDX Count or DistinctCount customers FILTER by measure value in a period dynamically

$
0
0

Hello!

I am trying to create a calculated measure in MDX to count the number of customers who have purchased (Sales Amount> 0) in the current month. But I would like to create a measure that I could also use to perform the same count in the YTD and YTD-1 analyzes.

I tried to query the form below, but it returns the static value, does not change the value according to the time filter as I need it:

Member [Measures].[CountCustomer] as 
Count(Filter([Customer].[Customer].[Customer].Members,[Measures].[Sales Amount] > 0))

Would you have a suggestion of how I could perform this count so that the calculated measure could also be used in a query that returns different periods of time?


Slice property based on multiple values from two dimensions

$
0
0

In populating the slice property for some partitions within SSAS 2008 R2, I want to slice by two attributes in different dimensions - [Dim Date].[Hierarchy].[Fiscal Year] and [Dim Case Events].[Event Description].

For one partition I set the where clause in the partition query to "DateKey BETWEEN 20091001 AND 20100930 AND CaseEventKey = 1" and set the corresponding slice property to "([Dim Date].[Hierarchy].[Fiscal Year].&[2010], [Dim Case Events].[Event Description].&[1])"  This works correctly for this partition based on one fiscal year and one caseeventkey. 

For another partition, I set the where clause in the partition query to "DateKey between 20051001 and 20090930 and CaseEventKey = 1" for one CaseEventKey across four fiscal years. I have tried several approaches to building the proper syntax for the corresponding slice property, but have not been successfull.  What seemed the most logical to me was the expression

{
([Dim Date].[Hierarchy].[Fiscal Year].&[2006], [Dim Case Events].[Event Description].&[1]),
([Dim Date].[Hierarchy].[Fiscal Year].&[2007], [Dim Case Events].[Event Description].&[1]),
([Dim Date].[Hierarchy].[Fiscal Year].&[2008], [Dim Case Events].[Event Description].&[1]),
 ([Dim Date].[Hierarchy].[Fiscal Year].&[2009], [Dim Case Events].[Event Description].&[1])
}

which returned the error: "arbitrary shape of the sets is not allowed in the current context."

Any help is greatly appreciated.

Controlling the MDX constructed by Excel PivotTables

$
0
0

Running SQL Profiler while refreshing an Excel PivotTable that runs for several minutes revealed how poorly performing the MDX is that Excel is constructing. Can someone answer why the MDX is this poor? Using an example against the Adventure Works database, the following query is used to populate a PivotTable.

SELECT	{
		[Measures].[Internet Sales Amount],
		[Measures].[Internet Order Quantity]
	} DIMENSION PROPERTIES 
		PARENT_UNIQUE_NAME,
		HIERARCHY_UNIQUE_NAME 
	ON COLUMNS , 
	NON EMPTY 
	CrossJoin(
		CrossJoin(
			CrossJoin(
				CrossJoin(
					Hierarchize({DrilldownLevel({[Customer].[Customer].[All Customers]},,,INCLUDE_CALC_MEMBERS)}), 
					Hierarchize({DrilldownLevel({[Customer].[Country].[All Customers]},,,INCLUDE_CALC_MEMBERS)})
				), 
				Hierarchize({DrilldownLevel({[Customer].[State-Province].[All Customers]},,,INCLUDE_CALC_MEMBERS)})
			), Hierarchize({DrilldownLevel({[Customer].[City].[All Customers]},,,INCLUDE_CALC_MEMBERS)})
		), Hierarchize({DrilldownLevel({[Customer].[Postal Code].[All Customers]},,,INCLUDE_CALC_MEMBERS)})
	) DIMENSION PROPERTIES 
		PARENT_UNIQUE_NAME,
		HIERARCHY_UNIQUE_NAME,
		[Customer].[State-Province].[State-Province].[Country],
		[Customer].[Postal Code].[Postal Code].[City],
		[Customer].[Customer].[Customer].[Address],
		[Customer].[Customer].[Customer].[Birth Date],
		[Customer].[Customer].[Customer].[Commute Distance],
		[Customer].[Customer].[Customer].[Date of First Purchase],
		[Customer].[Customer].[Customer].[Education],
		[Customer].[Customer].[Customer].[Email Address],
		[Customer].[Customer].[Customer].[Gender],
		[Customer].[Customer].[Customer].[Home Owner],
		[Customer].[Customer].[Customer].[Marital Status],
		[Customer].[Customer].[Customer].[Number of Cars Owned],
		[Customer].[Customer].[Customer].[Number of Children At Home],
		[Customer].[Customer].[Customer].[Occupation],
		[Customer].[Customer].[Customer].[Phone],
		[Customer].[Customer].[Customer].[Postal Code],
		[Customer].[Customer].[Customer].[Total Children],
		[Customer].[Customer].[Customer].[Yearly Income],
		[Customer].[City].[City].[State-Province] 
	ON ROWS  
FROM	[Adventure Works] 
CELL PROPERTIES 
	VALUE, 
	FORMAT_STRING, 
	LANGUAGE, 
	BACK_COLOR, 
	FORE_COLOR, 
	FONT_FLAGS

If on the Display tab of the PivotTable Options dialog box, the Show Properties in Tooltips and Show calculated members from OLAP server are unchecked, the query is simplified but still extremely slow.

SELECT	{
		[Measures].[Internet Sales Amount],
		[Measures].[Internet Order Quantity]
	} DIMENSION PROPERTIES 
		PARENT_UNIQUE_NAME,
		HIERARCHY_UNIQUE_NAME 
	ON COLUMNS , 
	NON EMPTY 
	CrossJoin(
		CrossJoin(
			CrossJoin(
				CrossJoin(
					Hierarchize({DrilldownLevel({[Customer].[Customer].[All Customers]})}), 
					Hierarchize({DrilldownLevel({[Customer].[Country].[All Customers]})})
				), 
				Hierarchize({DrilldownLevel({[Customer].[State-Province].[All Customers]})})
			), 
			Hierarchize({DrilldownLevel({[Customer].[City].[All Customers]})})
		), 
		Hierarchize({DrilldownLevel({[Customer].[Postal Code].[All Customers]})})
	) DIMENSION PROPERTIES 
		PARENT_UNIQUE_NAME,
		HIERARCHY_UNIQUE_NAME 
	ON ROWS  
FROM	[Adventure Works] 
CELL PROPERTIES 
	VALUE, 
	FORMAT_STRING, 
	LANGUAGE, 
	BACK_COLOR, 
	FORE_COLOR, 
	FONT_FLAGS

But that's not the true performance killer. Why is the Hierarchize(DrillDownLevel(......)) construct used? It's crazy stupid. The following query is well over 10 fold faster and it's not even all that good.

SELECT	{
		[Measures].[Internet Sales Amount],
		[Measures].[Internet Order Quantity]
	} DIMENSION PROPERTIES 
		PARENT_UNIQUE_NAME,
		HIERARCHY_UNIQUE_NAME 
	ON COLUMNS , 
	NON EMPTY 
	CrossJoin(
		CrossJoin(
			CrossJoin(
				CrossJoin(
					{[Customer].[Customer].[All Customers].Children}, 
					{[Customer].[Country].[All Customers].Children}
				), 
				{[Customer].[State-Province].[All Customers].Children}
			), 
			{[Customer].[City].[All Customers].Children}
		), 
		{[Customer].[Postal Code].[All Customers].Children}	
	 ) DIMENSION PROPERTIES 
		PARENT_UNIQUE_NAME,
		HIERARCHY_UNIQUE_NAME 
	ON ROWS  
FROM	[Adventure Works] 
CELL PROPERTIES 
	VALUE, 
	FORMAT_STRING, 
	LANGUAGE, 
	BACK_COLOR, 
	FORE_COLOR, 
	FONT_FLAGS

Martin

&lt;a href=&quot;http://martinsbiblog.spaces.live.com&quot; target=&quot;_blank&quot;&gt;http://martinmason.wordpress.com&lt;/a&gt;

SSAS 2016 Tabular and SSDT 2016 14.0.23107 - Translations - fr_FR doesn't appear?!

$
0
0

Hi, im working with SSDTMicrosoft Visual Studio 2015 Shell (Integrated)
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.01586
Installed Version: IDE Standard

connected to SSAS Tabular 2016.

Does it make any sense that in model translations fr_FR (French) doesn't appear, but a long list of other areas were French is spoken? My VM has French Regional settings, but the language in model.bin is English (US).

Regards

SQL Query Questions Answers

$
0
0
Hello Community,

Can someone please let me know where I can find a repository of sql queries and answers?

For example, I would like for find a repository of SQL queries and answers for the healthcare industry.

Thank you 

carlton

MDX Count inversely working

$
0
0

Hi guys i'm doing a count which is this: 

COUNT(Filter([Objectives100],
  [Measures].[Paid Value] = 100))

And what returns to me is all the count of the objectives substracting the objectives with a price different of 100. 

What returns:

TOTAL OBJECTIVES : 2972 | OBJECTIVES IN YEAR 2016 : 2961

And what it did is count all the objectives of all the time and substract only the 11 objectives that in the year 2016 were different of 100. 

To be more clear, for example in year 2019 all the objectives has a price of 100, so what it has to return is 182 (i know it because i counted it manually, was hard to me) but what returns is 2972 because is not substracting any objective with value different of 100 in 2019, hope you can help me guys thanks!


Viewing all 14337 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>