From the course: SQL Server Analysis Services

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Resolving issues with inactive relationships with USERELATIONSHIP

Resolving issues with inactive relationships with USERELATIONSHIP - SQL Server Tutorial

From the course: SQL Server Analysis Services

Resolving issues with inactive relationships with USERELATIONSHIP

- [Narrator] Let's write some decks to resolve the issues you saw with inactive date relationships in the last video. We want to be able to show sales for both order date and due date and be able to select one date value to make that happen. Here we see in the pivot table we've got total sales and both the order date and due date. And if we look at our filter, only the order date is being filtered. Let's resolve this within the model. So in our model, what we're going to do is we are going to create a calculation to provide the filtering using the inactive relationship. So we're going to create a new measure and this new measure is going to be for due date. So let's call this new measure total sales due date, comma equals. Because we are going to be filtering the total by the due date, we are going to be using the calculate function. And we are going to be filtering total sales so we'll just put that here. And to…

Contents