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

MDX EXCEPT Returns Duplicates

$
0
0

Hi

I have a fairly complex MDX calculated measure that makes use of the EXCEPT  function to remove Set2 from Set1.

However the results return a duplicate product of entries. How can I implement a type of DISTINCT before the SUM executes?

Currently I have to divide the measure by two as you can see in my script below to remove the duplicate amounts.

CREATE MEMBER CURRENTCUBE.[Measures].[Bought]
AS
SUM
(
        EXCEPT
        (
            EXISTS
            (
                [Contract].[Contract Key].Members,{[Contract].[Effective Period].CurrentMember}*{[Company].[Legal Owner].CurrentMember}*{[Period].[Period].CurrentMember},'Trend'
            )
            ,

            EXISTS
            (
                [Contract].[Contract Key].Members,{[Contract].[Effective Period].CurrentMember}*{[Company].[Legal Owner].CurrentMember}*{[Period].[Period].PrevMember},'Trend'
            )
        )
        *
        [Contract].[Effective Period].CurrentMember
        *
        {[Period].[Period].PrevMember}
        *
        {[Company].[Legal Owner].Members}
    ,[Measures].[Close] / 2
)
, FORMAT_STRING = "#,##0;-#,##0", 
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Trend'  ; 


I.W Coetzer


DAX , filter out Subset with AllExcept

$
0
0

This gets me 90% there

 

CALCULATE(SUM(VW_RPT_PortfolioReview_6Month[CurrentBalance]),ALLEXCEPT(VW_RPT_PortfolioReview_6Month,VW_RPT_PortfolioReview_6Month[POOL],VW_RPT_PortfolioReview_6Month[BalanceDate]))

 

I also want to also filter out 

VW_RPT_PortfolioReview[CATEGORY1]<>"Closed Full Redemption" &&

VW_RPT_PortfolioReview[CATEGORY1]<>"Closed with remaining shortfall"

 

I Tired with = and <> , does not filter out/Add  the "Closed with remaining shortfall"

 

CALCULATE(SUM(VW_RPT_PortfolioReview_6Month[CurrentBalance]),ALLEXCEPT(VW_RPT_PortfolioReview_6Month,VW_RPT_PortfolioReview_6Month[POOL],VW_RPT_PortfolioReview_6Month[BalanceDate]),VW_RPT_PortfolioReview[CATEGORY1]<>"Closed with remaining shortfall")

 

What am I doing wrong ?

How to connect Microsoft.AnalysisServices.AdomdClient with .NET Core 3 ?

$
0
0

Hi all,

I am trying to connect Microsoft SSAS cube with .net core 3 application with the help of “Microsoft.AnalysisServices.AdomdClient.dll” but am unable connect with OLAP cube. “unable to open Exception occurs while opening connection. Can any 1 help me to get out this issue.

First is “Microsoft.AnalysisServices.AdomdClient.dll” is compatible in .Net Core 3? Please confirm. If yes, then please let us know the version number which is compatible.

Error Details:

{Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException: A connection cannot be made. Ensure that the server is running. ---> Microsoft.AnalysisServices.AdomdClient.XmlaStreamException: The 'C:\Users\Public\Documents\TestApplication\DotNetCore3\16.4.0.42\Common\Data\OfflineCube\Adventure_Works_Ext.cub' local cube file cannot be opened. ---> System.ComponentModel.Win32Exception: The specified module could not be found. at Microsoft.AnalysisServices.AdomdClient.MsmdlocalWrapper.SetDelegates() at Microsoft.AnalysisServices.AdomdClient.MsmdlocalWrapper.get_LocalWrapper() at Microsoft.AnalysisServices.AdomdClient.LocalCubeStream..ctor(String cubeFile, OpenFlags settings, Int32 timeout, String password, String serverName) --- End of inner exception stack trace --- at Microsoft.AnalysisServices.AdomdClient.LocalCubeStream..ctor(String cubeFile, OpenFlags settings, Int32 timeout, String password, String serverName) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenLocalCubeConnection(ConnectionInfo connectionInfo) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)

Regards,

Tamil

MDX top 10 items for the top 25 customers

$
0
0

Good afterenoon forum

I am running into an issue that I have not been able to work out on my own.  Hopefully someone out here has run into a similar issue and can pass along their lessons learned.

I am working on a query to return the top 10 items purchased by our top 25 customers. Both the Customer and Product dimensions have multiple hierarchies and multiple levels in each hierarchy.

The Customers dimension hierarchy level consists of a parent customer, bill to customer, and ship to customer. The Product dimension hierarchy levels consist of Group, Division, Brand, and Product (SKU). 

I want the query to return the top 25 parent customers and the top 10 items they have purchased at the Product\SKU level of the product dimension. 

The query that I am using is below and runs with no errors, but I am getting null values in the Sales Dollars measure which is not correct. 

Select [sales dollars]onrows

Generate(nonempty(TopCount(Descendants([Customers].[Customers].[All Customers],[Parent Customer]),25,[sales dollars])) ,

     Crossjoin([Customers].[Customers].Currentmember,TopCount(Descendants([Products].[Products].[All Products],[Product]), 10, [sales dollars])))ONROWS

from [Sales]

 

After much head scratching and running other queries and existing queries I think part of my problem is the fact that we have multiple members with the same name at the Parent level of the customer dimension because of a concatenated key.  The keys are different but the names are the same.  Example: [Customers].[Customers].[All Customers].[Customer 1] could refer to [Customers].[Customers].[Parent Customer].[1].[1] or [Customers].[Customers].[Parent Customer].[1].[2]. 

When I change the query above to the query below I get the correct answer to my question for the one customer I am testing.

Select [sales dollars]onrows

Generate( [Customers].[Customers].[Parent Customer].[1].[1] ,

     Crossjoin([Customers].[Customers].Currentmember,TopCount(Descendants([Products].[Products].[All Products],[Product]), 10, [sales dollars])))ONROWS

from [Sales]

However the query below returns null dollars just as the main query. 

Select [sales dollars]onrows

Generate( [Customers].[Customers].[All Customers].[Customer 1 ,

     Crossjoin([Customers].[Customers].Currentmember,TopCount(Descendants([Products].[Products].[All Products],[Product]), 10, [sales dollars])))ONROWS

from [Sales]

 

So my issues to me with the [Customers].[Customers].Currentmember value being passed into the Crossjoin function during the generate function of the top items list. When I pass in a hierarchy level member the query returns correctly but when I return just the hierarchy member the results are incorrect. 

Has anyone seen this before or do you have a way to force the top 25 customers to be in the hierarchy level format. 

Thank you in advance for any input or assistance you may have. 

 

LastPeriods and Item Age issue

$
0
0

I have a multi-dimensional cube with the following dimensions, 1. Date, 2. Item, 3. Item Age

I have several measures that use the LastPeriods() MDX function with Sum() to add multiple months for averaging purposes.

I have an issue when slicing by the Age dimension. If the Age was different in one of the periods selected by the LastPeriods function, then both Ages are presented in the output where I am only expecting the Age corresponding to the Date Dimension filter, Nov-2018.

SSAS Server Version: 11.0.2100.60 (SQL Server 2012 RTM) (also tested with SSAS 2016 with the same results)

Item 10012 Age changes in Oct-2018, however as shown in the results below the Age 0-1 is also displayed when slicing by Nov-2018 using the Date dimension. In the fact table there is only one Age Key for Nov-2018 which is the key for Age 1-2.

Item 10012

Month

Age Bucket

Sep-18

0-1

Oct-18

1-2

Nov-18

1-2

Current Query Output for Nov 2018

Item / Age Buckets

Ratio 3 Months

Item 10012

15.7%

0-1

7.1%

1-2

20.0%

Grand Total

15.7%

Expected Query Output for Nov 2018

Item / Age Buckets

Ratio 3 Months

Item 10012

15.7%

1-2

15.7%

Grand Total

15.7%

Ratio 3 Months = [Measures].[3 Months Sales]/[Measures].[3 Months Item Cost]

SCOPE([Measures].[3 Months Sales]);

SCOPE ([Item].[Item].[Item].MEMBERS);

THIS = [Measures].[Sum Sales 3 Months]/[Measures].[3 Months Days;

END SCOPE;

[Measures].[Sum Sales 3 Months] = SUM(LastPeriods(3,[Date].[All Dates].CURRENTMEMBER),[Measures].[Sales])

[Measures].[3 Months Days] = SUM(LastPeriods(3,[Date].[All Dates].CURRENTMEMBER),[Measures].[Days])

SCOPE([Measures].[3 Months Item Cost]);

SCOPE ([Item].[Item].[Item].MEMBERS);

THIS =[Measures].[3 Months Cost];

END SCOPE;

[Measures].[3 Months Cost] = SUM(LastPeriods(3, [Date].[All Dates].CURRENTMEMBER),[Measures].[ Cost]))


Garry

DAX to get the user role

$
0
0

Hello everyone,

have a detailed row expression allowing users to drill through to detailed data. What I would like to do is set the DAX expression used in the detailed row expression according to the user role. So for example if a user belongs to role is X present columns abc and if role Y present columns abd and so on. Is there a way to do it in DAX?

Thanks,   

Zeev

Migrating tabular model from SQL Server 2012 Enterprise edition to SQL Server 2016 Standard edition

$
0
0

We are planning to move server from on premise to Azure.

SQL Server 2016 Standard edition supports all of the same tabular models as the Enterprise edition except for Perspectives, Multiple partitions, and DirectQuery storage mode. 

Currently we have configured SQL 2012 Enterprise edition for SSAS tabular model and have implemented perspectives.

I would like to know the impact of impact of moving SSAS tabular model from SQL Server 2012 enterprise edition to  SQL Server 2016 STANDARD edition.

Could you please let me know whether this is possible and if yes what is the impact?

Thanks

Bhuvana

How to add a calculated member to all members of a level?

$
0
0

Hello!

I'd appreciate advice on the issue in the title :)

To describe in more details, I have a cube with data about workers salaries and other fees in a big consortium (several companies). Therefore I created dimensions Time, FeeType and CompanyWorkers. I also created a CompanyHierarchy in CompanyWorkers dimension, which obviously is Company->Worker. Now I need to get average values of fees in each Company. I suppose that means I have to create a calculated member in the CompanyHierarchy. I know how to do that for a single member:

CREATE MEMBER CURRENTCUBE.[CompanyWorkers].[CompanyHierarchy].[Company].&[1].[Average] AS ....

Copying this line of code for every Company in my cube seems not correct. Can I write one command to add Average to EVERY Company?



TMSL - adding a relationship object to database

$
0
0

Hi,

Is it possible to add a relationship object to an existing database? Sample TMSL from the documentation does not work: 

"createOrReplace":{"database":{"name":"AdventureworksDW2016","description":"<description>","tables":[{},{},{}],"relationships":[{},{}]}}}

I tried to also CREATE with the db as a parentObject:

{
"create": {
"parentObject": {
"database": "test_conn"
},
"relationships": [{ }] }}

But I get a following error:

The JSON DDL request failed with the following error: Unrecognized JSON property: relationships. Check path 'create.relationships'

Is it possible to add relationships to an existing database?

Kind Regards,

Iga

SSAS 2017 Load Data from Azure Data Lake Errors

$
0
0

Working on loading CSV files from Azure Data Lake Store Gen 1 into SSAS 2017. I've been able to successfully load the files into Power BI; however, I'm getting the error below when I load the data into SSAS:

"Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [Expression.Error] We cannot convert the value null to type Logical..'."

Here is the M Code in Power BI:

let
Source = DataLake.Contents("adl://flstrain.azuredatalakestore.net/REv2/DataModel/factSales.Csv", [PageSize=null]),
Content = Source{[Name=""]}[Content],

Here is the M Code in SSAS:

let
Source=#"DataLake/https://flstrain azuredatalakestore net/REv2/DataModel/factSales",
Content = Source{[Name=""]}[Content],

The data does appear to be fine in the preview window.

I've tried to swap out the Source clauses and use DataLake.Contents() in SSAS but I still get errors.

Any thoughts?

Thanks! Brad

SQL

$
0
0

Hi Team,

Iam having data in a table which contains termination date of employees like below,

Last Hire DateTermination DateemployeeIDStatus
01-10-201802-12-2018Terminated
01-11-201810-12-2018Terminated
01-10-2018 Active

Output:

YearMonthTotal(Terminated+Active)Terminated countActive count
2018 oct202
2018 nov303
2018 dec321
2019 jan101

How to active count?that is the problem for me 

Converting miliseconds to minutes:seconds

$
0
0

I have the column duration(nvarchar datatype) with in a table.

how to convert milliseconds to minutes:seconds?

duration   Expected output

3000           0.03

2000           0.02

19000         0.19

24000         0.24

35000         0.35

37000         0.37

70000        1.01

Azure SSAS tabular Error processing, Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: Communication link failure; 08S01

$
0
0

Hi,

Im running AAS models and are processing my models through Automation account. One day I started getting an error after I added one partition to the process. Its was a normal partition like all the others.

I also get this message when I process the partition through SSMS. I have paused and started the service and still get this error. 

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: Communication link failure; 08S01; Communication link failure; 08S01; TCP Provider:

 An existing connection was forcibly closed by the remote host.

; 08S01.

Thanks in advance!


Diciphering SSAS Dimension processing errors

$
0
0

Hi,

We have made changes to some of the fields in our DimCustomer table and SSAS is now complaining with the errors below.

Address_Line fields were increased from 30 to 50 characters and we fixed those. But, we can't figure out what is wrong.

How do you work out which other column(s) is causing problems?

<return xmlns="urn:schemas-microsoft-com:xml-analysis"><results xmlns="http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults"><root xmlns="urn:schemas-microsoft-com:xml-analysis:empty"><Exception xmlns="urn:schemas-microsoft-com:xml-analysis:exception" /><Messages xmlns="urn:schemas-microsoft-com:xml-analysis:exception"><Warning WarningCode="2165374978" Description="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." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Address Line2' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3239837702" Description="Server: The current operation was cancelled because another operation in the transaction failed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'AML Risk Category' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238002695" Description="Internal error: The operation terminated unsuccessfully." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'AML ID Filter' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Activity' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Authorisation' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Customer Name' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Nationality' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'AML Vml Score' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Standard Industry Code Description' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Date Of Birth' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Joint Nationality' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Post Code' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Country' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Operation canceled; HY008." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /><Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Address Line3' attribute of the 'Customer' dimension from the 'SPBUK_DW-BI_Cubes' database was being processed." Source="Microsoft SQL Server 2014 Analysis Services" HelpFile="" /></Messages></root></results></return>

Measure group display based on condtition

$
0
0

Hi

I've two disctinct measures groupboth with distinct count. Based on time period condition need to display one measure group.

Measure group1 Distinct count : Customerkey_old

Measuregroup2 Distinct count: Customerkey_new (>0 this one already handled)

Date                    Customerey_old        CustomerKey_New

01-Jan-2019         112                         112

03-Jan -2019        114                         114

06-Feb-2019         115                         0

09-Feb-2019         116                         6

When user selects date dimension in excel, i.e., if anything is less than Feb  is selected then customerkey_old should be displayed, else customerkey_new

iif(date is Jan , measuregruoup1(Customerkey_old), measuregroup2(customerkey_new)

Result if jan selected = 2

Result if Feb selected = 1

Looking for help to write the above logic in mdx.

Thank you


TMSL - adding a relationship object to database

$
0
0

Hi,

Is it possible to add a relationship object to an existing database? Sample TMSL from the documentation does not work: 

"createOrReplace":{"database":{"name":"AdventureworksDW2016","description":"<description>","tables":[{},{},{}],"relationships":[{},{}]}}}

I tried to also CREATE with the db as a parentObject:

{
"create": {
"parentObject": {
"database": "test_conn"
},
"relationships": [{ }] }}

But I get a following error:

The JSON DDL request failed with the following error: Unrecognized JSON property: relationships. Check path 'create.relationships'

Is it possible to add relationships to an existing database?

Kind Regards,

Iga

Masking a column in Analysis Services Tabular / AAS

$
0
0

Hi,

I need to mask data in a column based on the logged in user in Azure Analysis Services. Column level security (hiding columns based on role) can not be used as in that case the columns exposed by the model becomes inconsistent and I cant build direct query dashboards on the model that uses the column. Is there any way how I can mask a column based on logged in user? Any thoughts/suggestions are welcome. My model uses direct query and the underlying db is Azure SQL DB.

Thanks in advance.

Change values in hierarchy

$
0
0

Hi everyone

I have SSAS cube with measure and org hierarchy. Org hier looks like this: org_unit1 => org_unit2 => org_unit3, and I have measure of org_unit2. I linked dimension to measure through org_unit2. So, when I choose some org_unit3, it shows me values for related org_unit2. Is it possible to get 0, instead of org_unit2 value?

Regards,

Yerkhan

Cumulative Sum/ Running Total | MDX

$
0
0

I have an SSAS Cube requirement (MDX) as below:

I am trying to create a calculated measure “Cumulative Sum/ Running Total” with the combination of multiple dimensions (around 7 dimensions). In addition, the users will be using any dimensions that they want. For example, we have a Product, Program, SubProgram, <g class="gr_ gr_8 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="8" id="8">ProgramStatus</g>, SubProgramStatus, Customer, and Date. The users should be able to add the dimension’s attribute to the lowest level as well as they should be able to roll-up the data to a higher level by excluding some of the dimensions such as the Product or SubProgramStatus, or both. Please note the users will be using the Report Layout as a Tabular Form and the can they should have the freedom to slice and dice.

I know how to create the cumulative measure by using the Date dimension such as YTD, but not sure how to create the MDX by including all the scenarios that the users might do, by including and excluding any dimension or attributes that they want. <g class="gr_ gr_25 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="25" id="25">Beside</g>, the users will have another non-cumulative measure that contains the base number for the cumulative measure, and the users will want to add the non-cumulative and cumulative side by side. By adding the cumulative and non-cumulative measures, the roll-up should show how the number increase. See the sample below:

Customer

Product ID

Sub Program ID

Program Name

Product Name

Day

Number of Order

Cumulative Order

Test

108

146

Test Program

Test Monthly

2018-05-24

8

8

 

 

 

 

 

2018-05-30

6

14

 

109

146

Test Program

Product Test 2

2018-05-24

12

12

 

 

 

 

 

2018-05-30

6

18

Test

108

146

Test Program

Test Monthly

2018-05-24

8

8

 

109

146

Test Program

Product Test 2

2018-05-24

4

4

Test

108

146

Test Program

Test Monthly

2018-06-01

2

2

 

 

 

 

 

2018-06-04

2

4

 

 

 

 

 

2018-06-07

4

8

 

109

146

Test Program

Product Test 2

2018-06-01

1

1

 

 

 

 

 

2018-06-04

1

2

 

 

 

 

 

2018-06-07

2

4

Any suggestion would be appreciated

Update fact table values in a Tabular SSAS Cube..

$
0
0

Hi everyone,

Context: In a DWH I have 2 tables "SALES" and "CUSTOMERS" and I had to implement SCD for "CUSTOMERS", but overwriting old data (surrogate keys) in "SALES", because SCD had to implement since 2017-04-01 so I update "SALES" rows from 2017-04-01 with new keys. (this Works fine)

Problem: I have a Tabular CUBE on SSAS with "SALES" partitions and I don't want to process all partitions afected with the SCD (a lot of data!), so it comes the question, Are there some statement in MDX, DMX or XMLA wich can do that? I mean, Update the rows affected in my cube fact table (only surrogate key values)

I have found UPDATE CUBE, UPDATE MEMBER (MDX) and UPDATE ELEMENT (XMLA) but I'm not sure this statements works.

Regards

Viewing all 14337 articles
Browse latest View live


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