Forum Discussion
DAX equivalent for DENSE_RANK Window function with KEEP clause
- 1 year ago
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] ) )
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]
)
)
Thank you very much Jihwan_Kim . Appreciate it .
I will try it out and let you know.