Azure SSAS Tabular Model - Fact table - Fact Table filter with different granularity

Sandz 71 Reputation points
2021-05-27T15:13:54.267+00:00

Hi All, In our Tabular model we got Claim_Order fact & Payment fact table. Linking between 2 fact is by Claims dimension.

Relationship: 1 claim can have many Payments.

All was fine until we got a requirement in which we need to list down all Claim_order and if there is any payment show the payment related details.(left join in simple SQL from Claim to Payment)

So for example we got 100 claim_order and out of which only 50 has paid, then our report should show all 100 claims along with payments details. Payment details are coming from Payment Fact and related payment dimensions.

We use Paginated report to generate this reporting requirement but when we start adding fields related to payment, it auto filters claims that has only a payment present in the Payment fact.

Any solution for this ? Do we need dummy payment record for the claims which doesn't have a payment in the Payment fact or DAX can solve this issue?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,034 questions
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,337 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Darren Gosbell 1,471 Reputation points
    2021-05-28T04:57:55.23+00:00

    You should be able to fix this by including a measure based on the Claim table. My suggestion would be to create a measure like the following:

    [Claim Count] := Countrows('Claim')

    then include this in your query. In this way you should get at least one row for each claim plus extra rows for each related payment (assuming you also have payment related measures in your query). This measure should return 1 for every row, but since you are using a paginated report you can just not use this column in your report.

    The reason this works is that queries against tabular models typically only return rows where the measures return non-empty values. So if you only have payment related measures in your query only claims that have payments will be returned.

    0 comments No comments

  2. Lukas Yu -MSFT 5,821 Reputation points
    2021-05-31T06:22:59.247+00:00

    Hi,

    Have your solved the problem ? Could we know your current progress?


  3. Sandz 71 Reputation points
    2021-05-31T17:32:05.84+00:00

    Added a bridging table to resolve this issue.

    0 comments No comments

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.