I am creating a report in which there is one table which should shows top 3 Employee Names and there respective sale amounts based on there Sales Amount.
When TOPN is used alone, I get correct output in form of new table. But its without sale Amount. However when TOPN is used along with CALCULATE function, I get all the Employee Names, which is incorrect
DAX query that works well but has only one column:
TOPN(3,values(Sale[Employee Name]),CALCULATE(sum(Sale[Total Excluding Tax])))
DAX Measure which is not filtering the top 3 rows :
TopN = CALCULATE(SUM(Sale[Total Excluding Tax]),TOPN(3,values(Sale[Employee Name]),CALCULATE(sum(Sale[Total Excluding Tax]))))
Where am I going wrong, please let me know. Screenshot of both the queries is as follows: