Forum Discussion
mysho999
6 years agoFrequent Visitor
TOP N
Hi i need advice. I have a spreadsheet of data. I would need to make two tables: The first table will show the TOP 2 department by Duration The second table will be the top1 Code and Co...
Anonymous
6 years agoNot applicable
Hi mysho999 ,
I create 2 tables using DAX, hope that's what you want:
Table = TOPN(2,SUMMARIZE('Hárok1','Hárok1'[Deparment],"total duration",SUM('Hárok1'[Duration (min)])),[total duration],DESC)
Table 2 = UNION(TOPN(1,SUMMARIZE(FILTER('Hárok1','Hárok1'[Deparment] in {"ENG"}),'Hárok1'[Deparment],'Hárok1'[Code],'Hárok1'[Code description],"top code duration",SUM('Hárok1'[Duration (min)])),[top code duration],DESC),
TOPN(1,SUMMARIZE(FILTER('Hárok1','Hárok1'[Deparment] in {"Maintenance"}),'Hárok1'[Deparment],'Hárok1'[Code],'Hárok1'[Code description],"top code duration",SUM('Hárok1'[Duration (min)])),[top code duration],DESC))
Please try.
Aiolos Zhao