Forum Discussion
RANKING ON DATES AND 2 GROUPS
The reply was created from a phone and is untested. An explanation of the general pattern and a
the sample is below. You will need to test and adjust the measure where needed. The key is RANKX
which you can research and find tutorials on for further use.
To create an index of dates chronologically, grouped by customers and contracts, while respecting filters, you can use the RANKX function in DAX. The RANKX function allows you to rank values based on a specific expression within a context. In this case, we'll use RANKX to rank the dates for CLIENT and CONTRAT.
Index Chronological =
RANKX(
FILTER(ALL('YourTableName'),
NOT(ISBLANK([DATE])) // Apply the necessary filters to exclude blank dates
),
[DATE],
,
ASC,
Dense
)
Hello,
Thank you for your fast answer but it dont works.
I have an error because the column DATE dont contains unique value.