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
FOXYBARK
Helper III
Helper III

Increment column year by 1 for each attribute

Hi. 

My goal: have an incremented [year] column that increments by 1 for each [Attribute = Y0]. 

I attempted to do this with an index column but not sure of the follow up DAX. I'm not really needing an index column anyway. 

 

My desired outcome. This will also start over per property name as well. I started with one property as my test. Any help is appreciated. 

YearAttributeIncrement Year Column
2024Y02024
2024Y12025
2024Y22026
2024Y32027
2025Y02025
2025Y12026
2025Y22027
2025Y32028
1 ACCEPTED SOLUTION

Hi @FOXYBARK,

Thank you for reaching out in Microsoft Community Forum.

You want a "New Column" that increments based on the numeric part of Attribute (Y0 = 1, Y1 = 2, etc.), restarting for each combination of Property and Year.

Please update the DAX like below;

New Column =
VAR AttrNumber =
VALUE ( SUBSTITUTE ( [Attribute], "Y", "" ) )
RETURN
AttrNumber + 1

This will increment the column based on the numeric part of the Attribute (e.g., Y0 = 1), and since your data naturally groups by Property and Year, it will restart as expected.

Please continue using Microsoft Community Forum.

If this post helped resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan

View solution in original post

8 REPLIES 8
v-pbandela-msft
Community Support
Community Support

Hi @FOXYBARK,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

v-pbandela-msft
Community Support
Community Support

Hi @FOXYBARK,

Thank you for reaching out in Microsoft Community Forum.

Thank you @lbendlin  for the helpful response.

As suggested by Ibendlin, Please provide some sample data, clearly explain the question you're trying to ask, and specify what outcome you expect.

Please continue using Microsoft community forum

Regards,
Pavan.

lbendlin
Super User
Super User

lbendlin_0-1745359978286.png

Increment Year = [Year] + INT(SUBSTITUTE([Attribute],"Y",""))

 

Hi @FOXYBARK,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, kindly "Accept  as  Solution" and give it a 'Kudos' so others can find it easily.

Thank you,
Pavan.

Thank you. This did not solve my specific issue. 

I did mention that I needed the increment to start over at a certain point. I suppose this will help someone else who doesn't have my specific issue. 

 

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

Hi. As I stated before, I need an increment column that starts over by property and by attribute. See desired outcome below. Thanks

FOXYBARK_0-1746459033980.png

 

Hi @FOXYBARK,

Thank you for reaching out in Microsoft Community Forum.

You want a "New Column" that increments based on the numeric part of Attribute (Y0 = 1, Y1 = 2, etc.), restarting for each combination of Property and Year.

Please update the DAX like below;

New Column =
VAR AttrNumber =
VALUE ( SUBSTITUTE ( [Attribute], "Y", "" ) )
RETURN
AttrNumber + 1

This will increment the column based on the numeric part of the Attribute (e.g., Y0 = 1), and since your data naturally groups by Property and Year, it will restart as expected.

Please continue using Microsoft Community Forum.

If this post helped resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan

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.