Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
Year | Attribute | Increment Year Column |
2024 | Y0 | 2024 |
2024 | Y1 | 2025 |
2024 | Y2 | 2026 |
2024 | Y3 | 2027 |
2025 | Y0 | 2025 |
2025 | Y1 | 2026 |
2025 | Y2 | 2027 |
2025 | Y3 | 2028 |
Solved! Go to 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
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.
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.
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
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |