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! Request now

Reply
srjohnson212
Frequent Visitor

Divide columns within date range

I am trying to calculate the % promotions in the last 12 months.  I have a Calendar table that I'm using along with my data set.  To get the overall % promotions I am using:

% Promoted =

    DIVIDE(

       SUM('Emp_Table'[# of Promotions]),

       COUNTA('Emp_Table'[Emp_ID])

 

How do I return only results for the last 12 months?

 

Thanks, Shannon

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @srjohnson212 

try below

% Promoted =

    calculate(DIVIDE(

       SUM('Emp_Table'[# of Promotions]),

       COUNTA('Emp_Table'[Emp_ID]),
        dateadd('calender table'[date],-12,month)
   )

View solution in original post

3 REPLIES 3
Dangar332
Super User
Super User

hi, @srjohnson212 

try below

% Promoted =

    calculate(DIVIDE(

       SUM('Emp_Table'[# of Promotions]),

       COUNTA('Emp_Table'[Emp_ID]),
        dateadd('calender table'[date],-12,month)
   )

Hi @Dangar332 , that didn't work unfortunately.  I was trying to use something similar except I used datesinperiod instead of dateadd.  Do you have any other suggestions?

 

Thanks.

@Dangar332 Apologies, once I moved the parenthesis to the proper place, it worked.  Thank you!!

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.