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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
kfordo
Regular Visitor

Connecting Summarized Table to Calculated Measure

I'm working to try to calculate the difference between a projection and an actual table. In the projection table (visual below) I have a summarized table that has projected attrition by month. Meanwhile my actual counts comes from an unsummarized table where I have a measure that counts attrition by counting rows of employee exits. 

Where I am stuck is how do I connect the table so that I can subtract the actuals measure from the projection number below. 

kfordo_3-1721919789478.png

 

IE. In the projections table I have 14 projected attrition in the actual count I have 12. I want a calculation that tells me the difference is 2.

2 ACCEPTED SOLUTIONS

Please add a 'Date' column and add some relationships.

In this formurla '1' means the first day of month.

You may use '2'-'28' insted of '1'.

When calculating by month, there is no problem in specifying a fixed value for the day.

 

Date = DATE([Year],[Month],1)

mickey64_0-1722005998101.png

 

View solution in original post

@kfordo 

you can create a date time in table 1

date = date('Table 1'[Year],'Table 1'[Month],1)
11.PNG
 
then you can build relationship between table 1 and dim time table.
 
then you can create measures
 
actual exits = countx(FILTER(all('Table 2'),year('Table 2'[Termination Date])=max('Table 1'[Year])&&month('Table 2'[Termination Date])=max('Table 1'[Month])),'Table 2'[Termination Date])
difference = [actual exits]-sum('Table 1'[Projected Exits])
 
12.PNG
 
 
pls see the attachment below
 
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
mickey64
Super User
Super User

I think if you add a calendar table and set up 2 relationships between the two data tables and the calendar table you can create a subtraction formula.

The issue I'm encountering is that the projections table is only by month and the employee data table is by date. 

kfordo_0-1722001352188.png

Is there a way to connect both to the calendar table?

Please add a 'Date' column and add some relationships.

In this formurla '1' means the first day of month.

You may use '2'-'28' insted of '1'.

When calculating by month, there is no problem in specifying a fixed value for the day.

 

Date = DATE([Year],[Month],1)

mickey64_0-1722005998101.png

 

ryan_mayu
Super User
Super User

pls provide the sample data of two tables (not the screenshot) 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




So here are example tables and an example of the output I'm looking for. I think what may be the issue is how I'm connecting the projections table to the calendar table since projection table is only by month. 

kfordo_0-1722001163030.png

Thank you for any help!

@kfordo 

you can create a date time in table 1

date = date('Table 1'[Year],'Table 1'[Month],1)
11.PNG
 
then you can build relationship between table 1 and dim time table.
 
then you can create measures
 
actual exits = countx(FILTER(all('Table 2'),year('Table 2'[Termination Date])=max('Table 1'[Year])&&month('Table 2'[Termination Date])=max('Table 1'[Month])),'Table 2'[Termination Date])
difference = [actual exits]-sum('Table 1'[Projected Exits])
 
12.PNG
 
 
pls see the attachment below
 
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors