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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jmaurer17
Frequent Visitor

Help Needed: Issue with Compounding Contract Year Salary Increase Values

 

Hi everyone,

I'm encountering an issue with my DAX measure for calculating the cumulative percentage salary increase over multiple contract years. The measure is not correctly compounding the salary increase values. Here is the DAX code I'm using:

Cumulative % Salary Increase = 
VAR CY1Increase = SELECTEDVALUE('CY 1 Salary Inc'[CY 1 Salary Inc], 0) / 100
VAR CY2Increase = SELECTEDVALUE('CY 2 Salary Inc'[CY 2 Salary Inc], 0) / 100
VAR CY3Increase = SELECTEDVALUE('CY 3 Salary Inc'[CY 3 Salary Inc], 0) / 100

VAR ContractYear = SELECTEDVALUE(SPC[Contract Year], 1)  

RETURN 
SWITCH(
    TRUE(),
    ContractYear = 1, CY1Increase * 100,  
    ContractYear = 2, ((1 + CY1Increase) * (1 + CY2Increase) - 1) * 100,  
    ContractYear >= 3, ((1 + CY1Increase) * (1 + CY2Increase) * (1 + CY3Increase) - 1) * 100,  
    BLANK()
)

The goal is to correctly compound the salary increases for each contract year. However, the results I'm getting don't seem to reflect the expected compounded values.

I suspect there might be a precision point error affecting the calculations. All data types involved in the calculations are set to decimal numbers.

Could someone please help me identify what might be going wrong with this measure? Any insights or suggestions would be greatly appreciated!

Thank you in advance!

1 ACCEPTED SOLUTION

Don't see the issue?

 

lbendlin_0-1741459109950.png

lbendlin_1-1741459342288.png

 

View solution in original post

5 REPLIES 5
jmaurer17
Frequent Visitor

Appreciate the response. Here is the input and desired output:

Contract Year Salary Inc input parameter Expected Cumulative % Increase

CY 1 - 2.0%2.00%
CY 2 - 3.0%5.06% (2% compounded with 3%)
CY 3 - 3.0%8.14% (2% → 3% → 3% compounded)

 

So the user a inputs a contract year salary increase percentage for one or all of the contract years. I get numbers close to this figure, but not exact - leading me to suspect a precision error. 


So the user a inputs a contract year salary increase percentage for one or all of the contract years

How? How does the user input these numbers?

The user inputs a percent increase into one or all (three) Contract Year Salary Inc parameters. I have a seperate numeric paramater for each contract year CY 1 through CY 3 in this case

Don't see the issue?

 

lbendlin_0-1741459109950.png

lbendlin_1-1741459342288.png

 

lbendlin
Super User
Super User

Any particular reason for not using PRODUCTX ?

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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