Forum Discussion
Creating sequential numbering system based of Today's Month
- 3 years ago
Hi aausten22
Add to the calculated column which ranks your dates based on month-year:rank_Months =RANKX ('date',RANKX ( 'date', YEAR ( 'date'[Date] ),, DESC, DENSE ) * 100+ RANKX ( 'date', MONTH ( 'date'[Date] ),, DESC, DENSE ),,ASC,DENSE)It will work dynamically as you mentioned that you need
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi aausten22
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
What I am wanting to achieve is an ordering system that starts with the current month as 1 and numebring backwards to 12
So the column would look like this:
| Date | Order |
| Jun 23 | 1 |
| May 23 | 2 |
| Apr 23 | 3 |
| Mar 23 | 4 |
So when the month changes, the order changes as well. So if we go into July then it would look like the following:
| Date | Order |
| Jul 23 | 1 |
| Jun 23 | 2 |
| May 23 | 3 |
| Apr 23 | 4 |
This would be an automatic change so that visuals and slicers are all the same
- Ritaf19833 years ago
Super User
Hi aausten22
Add to the calculated column which ranks your dates based on month-year:rank_Months =RANKX ('date',RANKX ( 'date', YEAR ( 'date'[Date] ),, DESC, DENSE ) * 100+ RANKX ( 'date', MONTH ( 'date'[Date] ),, DESC, DENSE ),,ASC,DENSE)It will work dynamically as you mentioned that you need
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly