Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi, I have a table with three columns like this : Year, Name, Budget.
I would like to iterate over the rows in order to get a new column representing the number of rows in the complete table that has a year between the year of the current row minus one and the year of the current row minus five.
So the condition for the row count is also row based.
How can I do that please ?
Thanks 👍
Hi, @MoaMaime
Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Well data are really simple, for example as follow. I added the wanted column (named ColumnWanted) at the far right with the wanted values for this example.
Year | Name | Budget | ColumnWanted |
2019 | A | 159 | 2 |
2021 | B | 147 | 1 |
2014 | C | 123 | 0 |
2015 | D | 59 | 1 |
Thank you !
User | Count |
---|---|
118 | |
66 | |
65 | |
56 | |
50 |
User | Count |
---|---|
181 | |
85 | |
67 | |
61 | |
53 |