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
Anonymous
Not applicable

Date Modeling to Power BI from SSAS Tabular Live Connection

Hi, I'm having an issue with some date modeling from a SSAS Tabular live connection to Power BI.

 

The problem is that I have a table of staff absences and I want to count monthly absences and compare with previous years.... sounds easy enough however, each absence has a start and end date (DD/MM/YYYY), which often span over multiple months.

For example:

 

Staff_Name      Start_Date          End_Date      No_Days_Absent

Staff A               01/02/2015          05/02/2015         5

Staff B               14/02/2015          15/02/2015         2

Staff C               12/02/2015          11/02/2016         365

....                       ....                          ....                       ....

 

As you will notice 'Staff C' has been recorded as long term sick so has been set as 365 days absence.

Initially, I wanted to simply group absenses by start_date so I could display a bar chart by month (x-axis) however it doesn't count the range of the dates (start_date to end_date) that exceed a month.

 

What would be the best approach do you think? Or how could I create a calculated table that could display every individual day in the absence period?

 

Thanks

Chris

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Anonymous,

 

Glad to hear that. You may help accept solution. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may drag [Date] from a calendar table and try to use FILTER Function.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks but I've actually just found the DAX solution from Phil_Seamark in this thread:

 

https://community.powerbi.com/t5/Desktop/Convert-date-ranges-into-list-of-dates/td-p/129418

@Anonymous,

 

Glad to hear that. You may help accept solution. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.