Cant sort on a specific column suing rank and custom function

Chayan
Chayan Member
edited February 5 in Beast Mode

when I create a calculated field using this formula and this is created as Ranking
CASE WHEN
RANK() OVER (PARTITION BY SUB_CATEGORY_TXT ORDER BY SUM(SALES_LC_AMT) DESC) >=6 THEN 1000
ELSE RANK() OVER (PARTITION BY SUB_CATEGORY_TXT ORDER BY SUM(SALES_LC_AMT) DESC)
END

now when I drag and drop Ranking to filtering, it says "An issue has occurred during processing. We are unable to complete the request at this time. 
"

Best Answer

  • ST_Superman
    ST_Superman Domo Employee
    Answer ✓

    When you add a window function to the filter section, you will need to make sure that you partition by everything that is getting partitioned in the table or graph. For example, it looks like you have two fields, "SUB_CATEGORY_TXT" and "Manufacturers" in the table, but you are only partitioning your calculated field by the former. Try partitioning by both fields and see if that helps.

Answers

  • ST_Superman
    ST_Superman Domo Employee
    Answer ✓

    When you add a window function to the filter section, you will need to make sure that you partition by everything that is getting partitioned in the table or graph. For example, it looks like you have two fields, "SUB_CATEGORY_TXT" and "Manufacturers" in the table, but you are only partitioning your calculated field by the former. Try partitioning by both fields and see if that helps.