Filter a record by null and the use rank function on that table how to do that?
Solution:
This code filters records where the column YourColumnName contains null values.
Filtered Table=
FILTER( Tablename ,isblank(table[YourColumnName])
)
Now, to rank these filtered records, you can use the RANKX function:
Ranked table=ADDColumns(
Filtered Table,
"Rank",
Rankx(Filtered Table,table[YourColumnName],,desc,dense)
)
SupposeIf you want to replace the null values with a specific value, such as 100,000 (1 lakh), you can use the IF function along with ISBLANK to achieve this. Here's how you can modify the previous code to replace null values with 1 lakh:
FilteredTable =ADDCOLUMNS ( YourTableName, "FilteredColumn", IF ( ISBLANK ( YourTableName[YourColumnName] ), 100000, -- Replace null with 1 lakh YourTableName[YourColumnName] ))
Source: Snehanshu Sengupta Medium article.