Forum Discussion
Sorting table with multiple columns
- 7 years ago
Anonymous solution attached, look at table1 in attached, it has few columns and measures. you can play with it as per your need, didn't had much time to work on it thou but I guess you will get idea from it.
Exactly!!! Am I missing something? I tried multiple ways but I am in one step behind the solution. Can you please explain?
Anonymous solution attached, look at table1 in attached, it has few columns and measures. you can play with it as per your need, didn't had much time to work on it thou but I guess you will get idea from it.
- Anonymous7 years agoNot applicable
Hi parry2k
The below doesn't work and the Y/N column is empty for my case:
#_TOP = var x = TOPN([TOTAL_ROWS], VALUES('Table'[A), [B], DESC) RETURN IF('Table'[A] IN x, "Y")Table is the table name, A, B are the columns. B is the column need to be sorted. Total_Rows is the rows to be taken in Top N.
Once I get the results, I need to rank the result set by Column C and get only Top 5 Rank. Can you please help on this issue? Thanks!
- parry2k7 years agoSuper User
Anonymousdoes the solution attached previosuly is not working?
- Anonymous7 years agoNot applicable
Hi parry2k
Thank you for the reply. I am getting ciurcular dependency :(
Below are the 2 screenshots for your reference.
The table is created using a DAX expression which is as below:
Table = VAR current_month= [#_LATEST_MONTH] RETURN SUMMARIZE(CUSTSURVEY, CUSTSURVEY[ASSIGNEE_SUPPORT_GROUP], "#_of_Survey", CALCULATE(COUNT(CUSTSURVEY[ENTRY_ID]), FILTER(CUSTSURVEY, [#_GET_MONTH_AND_YEAR] = current_month && [#_IS_SURVEY_RESPONDED] = "Yes")), "% Negative Reviews", (CALCULATE ( COUNT ('CUSTSURVEY'[ENTRY_ID]), FILTER ( 'CUSTSURVEY', ( 'CUSTSURVEY'[#_GET_MONTH_AND_YEAR] = current_month && (('CUSTSURVEY'[OVERALL_EXP] = 0)||('CUSTSURVEY'[OVERALL_EXP] = 1)) && NOT ISBLANK ('CUSTSURVEY'[OVERALL_EXP]) ) ) ) / CALCULATE ( COUNT ( 'CUSTSURVEY'[ENTRY_ID] ), FILTER ( 'CUSTSURVEY', ( 'CUSTSURVEY'[#_GET_MONTH_AND_YEAR] = current_month && ( 'CUSTSURVEY'[#_IS_SURVEY_RESPONDED] = "Yes" ) ) ) ) ) )Can you tell me what am missing? Thanks!