Sauron
Sauron

Reputation: 6647

Multi-dimensional to Tabular mapping one column to several

I have the following mapping within an old multi-dimensional cube:

enter image description here

Each one of these 3 INVOICE_FACT columns maps to the same sman_key column within the salesman table. I know within tabular that only one column is permitted to be mapped to another column.

How can I replicate this relationship within tabular?

Upvotes: -1

Views: 158

Answers (1)

mendosi
mendosi

Reputation: 2051

The two standard approaches to this issue are to either create multiple relationships between the two tables (only one relationship can be active at a time) or to import the salesman table multiple times with different names (e.g. salesman, supervisor, driver).

Without knowing more about the way that your data model is being used, it is hard to recommend the approach to use, but I tend to favour importing the salesman table multiple times.

If you use inactive relationships, a key function to know is the USERELATIONSHIP() function which specifies that a particular calculation is to occur using an inactive relationship.

https://www.sqlbi.com/articles/userelationship-in-calculated-columns/ provides some example of this technique where the relationships are to a date dimension, and you want to have measures which accumulate sales amounts according to Order Date, Due Date, or Ship Date (as per AdventureWorks) e.g.

SalesByDueDate := 
    CALCULATE (
        SUM ( FactInternetSales[SalesAmount] ),
        USERELATIONSHIP (
           FactInternetSales[DueDateKey],
           DimDate[DateKey]
        )
    )

Upvotes: 0

Related Questions