SSAS DAX. Outer join DateDim to fact table

Andy Bolk 10 Reputation points
2023-04-26T18:01:21.7466667+00:00

I have a tabular model in SSAS that has a DateDim table that has a relationship to a fact table, which holds appointment data. The ultimate goal is to pull this data into Power BI Report Builder, so I would like to get this as 2 dataset if possible. The SQL query I am trying to recreate is

SELECT *

FROM DateDim d

LEFT OUTER JOIN FactTable f

ON d.DateKey = f.DateKey

I would like to return 1 row for every date in the date range I specify, and then 0 to multiple rows from the fact table for those dates. I'm trying to create a calendar that would then show a list of appointments for each day.

Is there a DAX query that I can use to write this? Or any other suggestions?

Thanks

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,063 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,344 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andy Bolk 10 Reputation points
    2023-04-26T18:05:55.8+00:00

    That should say as a single dataset.

    0 comments No comments

  2. Anonymous
    2023-04-27T02:17:01.9533333+00:00

    Hi @Andy Bolk

    Can this post help you?

    https://www.wiseowl.co.uk/blog/s2471/calendar-table.htm

    Best regards,

    Percy Tang


    If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

    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.

    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.