Forum Discussion
Anonymous
5 years agoNot applicable
TOPN in Microsoft Docs wrong documentation ERROR
I understand that TOPN is a table function which takes the following parameters: - how many rows you want to show - which table name - what do you want to sort it by In the documentation: http...
wdx223_Daniel
Community Champion
5 years agoTOPN is a iterator, it generates a row context based on the second parameter. if the sort by field,ie the third parameter, is one column of the second parameter, then it will reference the field of conresponding row. if you set a field which not belongs to the second parameter, then will get a error, then you need to use a expression of aggregation function or a measure. on this point, you must be careful of context transactions. a measure or a expression using calculate function will automatically transacts all current row context into filter context.