How to display top 3 highest amount info for a record from a table?

天涯浪子 提交于 2021-01-29 04:43:41

问题


For one of the tables imported into the PowerBI, I have columns as Company Name, Debit Amount, Credit Amount and Net Amount (Calculated column: Debit Amount- Credit Amount).

Now is it possible to pull the three highest Company Names from the table in terms of having either higher Debit, Credit or Net Amount and display it on a tile? May be by creating a measure using DAX or OOTB? It should look like:

Top Grossing             Second Grossing       Third Grossing 
12000(Net Amount)        10000(Net Amount)     5000 (Net Amount)
Company Name             Company Name          Company Name

I am envisioning the above in terms of tiles and they would change dynamically once anything updates in the data source table. Not sure if this is possible to do using DAX, I am open to suggestions. Any help will be greatly appreciated. Thanks.


回答1:


DAX has a TOPN() function that you can use for this sort of thing.

The other possibility is to use the built-in advanced filtering. Under the visual level filters, choose filter type Top N, pick how many you want to show and what value you are sorting by.



来源:https://stackoverflow.com/questions/49329134/how-to-display-top-3-highest-amount-info-for-a-record-from-a-table

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!