Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kanika
Regular Visitor

Date dimension table and Employee fact table in SSAS tabular 2016 and power BI

Hi All , 

 

I have a scenario in Power BI and SSAAS 2016 Tabular model , if I am connecting startdate with date key from Date table then in power BI graph it is counting employee to be active only for date matching with start date and after that it is not counting this employee. 

I am seeking for a solution where my employee should be visible on graph as active for all the dates between its start date and end date.

 

Capture.PNG

 

Could any one please suggest how do I join the start dates and end dates with Date dimension. Also, when I am showing date from date table in power BI graph this employee should count for each date between his start date and end date.

 

Thanks in advance !!!!

 

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Kanika,

 

You could Cross Join Employee table and Date table. Then, filter the new crossjoin table with syntax: Date>=Start Date && Date<=End date

 

The DAX formula is similar to:

New Table =
FILTER (
    CROSSJOIN ( 'Date table', 'Employee table' ),
    'Date table'[Date] >= 'Employee table'[Start date]
        && 'Date table'[Date] <= 'Employee table'[End date]
)
Then, establish a one to many relationship from 'Date table' to 'New table' based on [Date] column.
 
Regards,
Yuliana Gu
Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Yuliana,

Is there a way to achive this without creating any additional physical table with Cross join because I have this scenario at multiple places that will impact my dictionary size.

Ultimately, at the end the need is to drag dates on one axis and active user count on another axis.

Regards,
Kanika Soni

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.