cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Need help! Apply minimum wage increase for applied month and all months after

Hi All! I am trying to calculate base rates for employees by month. I have minimum wage changes for different employees by month.

I have the wage changes as a % by the employee as an import. I also have their base rates. These two tables and the Year & Month table are all connected by valid and active relationships.

I am trying to create a new measure that takes the base rate and multiplies by the wage change (with keeping the regular base rate if there is no wage change). BUT, I want that new wage to stay for future months.

Ex:
Employee A has a rate of \$15 for beginning of 2024 for each month. Starting in July, they have a % change of 103%. I would like July, August, September, etc. to show the new wage of 15+103%.

Thank you SO much!!!!!!!!!!

5 REPLIES 5
Frequent Visitor

Hi, I am unsure how to share the PBI link as this is from my companys OneDrive. I don't believe it would be beneficial because this is not the same as the one I am using due to important internal information. The relationships are not necessarily the same. Please refer to my screenshots for the issue with the formula. The formula is not applying after May when it needs to continue being applied to June and July. Does that make sense? Sorry I can't provide more information! Are there other formulas or screenshots that would be helpful?

Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

WINDOW function (DAX) - DAX | Microsoft Learn

PRODUCTX function (DAX) - DAX | Microsoft Learn

``````expected result measureL =
VAR _basewage = SUM( employee_base_wage[base_wage] )
VAR _increment =
CALCULATE(
PRODUCTX(
ADDCOLUMNS( VALUES( calendar[month-year sort] ), "@increment", CALCULATE( SUM( increment[increment] ) ) ),
[@increment]
),
WINDOW(
1,
ABS,
0,
REL,
ALL( calendar[month-year sort], calendar[month-year] ),
ORDERBY( calendar[month-year sort], ASC )
)
)
RETURN
IF( HASONEVALUE( employee_base_wage[employee] ), _basewage * _increment )``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Frequent Visitor

Hi, thank you so much for your fast response. I really appreciate it because I am still having trouble. I have attached a screenshot of an example of what I am seeing on my end. The formula you provided unfortunately does not work for me. I do not have month order sorts and am not sure what to put in the "@increment" portion of the formula on the addcolumns line.

Role B and C have minimum wage changes in April of 2022. Their original rates were 18.62 and 17.61 respectfully. With the % change increase, their new rates should be 19.18 and 18.14 respectfully. I was able to create a formula titled "Wages with Minimum Wage Change in Effect" that keeps the new wage for the future months but for some reason it is only sticking for May, and not June or July.

I also created a Wage Rate with % change formula but of course it only applies the % change for that specific month.

I need to update the formula to have the \$19.18 and \$18.14 show as the wage for April onwards. But prior to April, I would want the original \$18.62 and \$17.61 to show. Additionally, for Roles that don't have minimum wage changes, I would like to keep the original Base rate.
Role B and C have minimum wage changes in April of 2022. Their original rates were 18.62 and 17.61 respectfully. With the % change increase, their new rates should be 19.18 and 18.14 respectfully.

Super User

Hi,

Thank you.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Frequent Visitor

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors