Forum Discussion
DAX equivalent for DENSE_RANK Window function with KEEP clause
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.Please check the below picture and the attached pbix file.
The below formula is for creating table, and I tried to use TREATAS and INDEX DAX functions.
INDEX function (DAX) - DAX | Microsoft Learn
TREATAS function - DAX | Microsoft Learn
expected result table = SUMMARIZECOLUMNS ( data[emp_id], data[job_code], data[sal], TREATAS ( INDEX ( 1, SUMMARIZE ( data, data[emp_id], data[hire_date] ), ORDERBY ( data[hire_date], DESC ), , PARTITIONBY ( data[emp_id] ) ), data[emp_id], data[hire_date] ) )
3 Replies
- Ritaf1983Super User
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
- Jihwan_KimSuper User
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.Please check the below picture and the attached pbix file.
The below formula is for creating table, and I tried to use TREATAS and INDEX DAX functions.
INDEX function (DAX) - DAX | Microsoft Learn
TREATAS function - DAX | Microsoft Learn
expected result table = SUMMARIZECOLUMNS ( data[emp_id], data[job_code], data[sal], TREATAS ( INDEX ( 1, SUMMARIZE ( data, data[emp_id], data[hire_date] ), ORDERBY ( data[hire_date], DESC ), , PARTITIONBY ( data[emp_id] ) ), data[emp_id], data[hire_date] ) )- zahirmohideenHelper I
Thank you very much Jihwan_Kim . Appreciate it .
I will try it out and let you know.