A Dimension with 2 facts on different grains

Ismail Cassiem 226 Reputation points
2021-07-07T23:29:43.997+00:00

Good day,
i have received a request where i should only measureA where measureB has data

1 Dimension: Trip_TripNo
Fact MeasureGroup A: Count Trips
Fact MeasureGroup B: trip detail order qty

Mease A & B is the same source byt aggrageted at different levels, and the link to Trip DImension on Trip_No
I know i can enable unrelated measure=false
however the dm link is the same and i find Measue shows values where measureB has no data

i was thinking of working the count in measureB to have 1 measure but the count would be incorrect due to the detil of trp it includes

Any ideas please?

regards

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,284 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarrinWu-MSFT 6,871 Reputation points
    2021-07-08T06:16:47.787+00:00

    Hi @Ismail Cassiem ,

    Welcome to Microsoft Q&A!

    You should create 2 dimensions to join 2 fact tables, because you said the same source aggregated at different levels. Please refer to this thread to get more details, see below:

    Your dimension is represented by the surrogate key in whatever facts it applies to, so it should be the surrogate key that appears in fact 2.
    I didn't spot the point of your question, originally, where you mentioned the 2nd fact was of a different grain. The dimensional way of doing this is to have a second dimension at that higher level, which only has columns appropriate to that grain. Both dimensions are 'conformed' in the sense that the titles and contents of the fields align.

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.