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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
lekkerbek
Helper IV
Helper IV

Calculate YTD when you have a fixed amount per week

Hi,

 

Hope someone can point me in the right direction. 

 

I have a dimtable with staff:

- employee number

- employee name

- standard number of appointments per week

 

I have a fact tabel with:

- date

- employee

- appointment

 

I would like to create a visual that shows the number of actual appointments vs the norm. How would you approach this? Below is an example of some data.

 

Dimtable    End result   
EmployeenumberEmployeenameNumber of appointments per week  WeekEmployeenameActualBudgetDifference
1John Doe15  1John Doe315-12
2Jane Doe20  1Jane Doe220-18
     2John Doe615-9
     2Jane Doe420-16
Facttable         
DateEmployeenumberAppointment       
2-1-202311  End result cumulative   
2-1-202311  WeekEmployeenameActualBudgetDifference
2-1-202311  1John Doe315-12
2-1-202321  1Jane Doe220-18
2-1-202321  2John Doe930-21
10-1-202311  2Jane Doe640-34
10-1-202311       
10-1-202311       
10-1-202311       
10-1-202311       
10-1-202311       
10-1-202321       
10-1-202321       
10-1-202321       
10-1-202321       
2 REPLIES 2
lekkerbek
Helper IV
Helper IV

Hi,

 

Thank you for your answer, but I doubt this is the solution to my problem? The dimtable has the information per week in general, so it just says you should have 15 appointments per week. How would you translate that to a date, so for example it should be:

 

2 January 2023: 15 appointments

9 January 2023: 15 appointments

16 January 2023: 15 appointments

etc

 

The source is an Excelsheet, so I can implement new columns with these dates, but I was wondering if there is a solution in Power BI.

amitchandak
Super User
Super User

@lekkerbek , create common tables Employee Number and Date. Date may join to one table only , Using the common dimension and and measure from both tables create the above visual, it should work

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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