Forum Discussion
Anonymous
7 years agoNot applicable
Adding index number based on category
Hello, folks! How can I add an index number that runs based on category type stated in another column? See the example picture. This is what I want to achiecve. I'd like the index column to give a...
- 7 years ago
What if you add another column called FkDte with this formula
=Table1[Date]+RANDBETWEEN(1,1000) / 10000
and then add another columns with this formula
=CALCULATE(
COUNTROWS( Table1 ),
ALLEXCEPT( Table1, Table1[Category] ),
Table1[FkDte] < EARLIER( Table1[FkDte] )
) + 1by the way, do you only have 2 columns in the original table (Date, Category), or do you have other columns that could avoid the usage of the FkDte column?
PattemManohar
Community Champion
7 years agoAnonymous Please try this using "New Column"
Index = RANKX(FILTER(Test13Rank,Test13Rank[Category]=EARLIER(Test13Rank[Category])),Test13Rank[Date],,ASC,Dense)
Leslie1015
3 years agoFrequent Visitor
Thanks for your example. Very simple but it definitely gave solution to my problem!