如何显示表格中记录的前 3 个最高金额信息? [英] How to display top 3 highest amount info for a record from a table?

查看:8
本文介绍了如何显示表格中记录的前 3 个最高金额信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于导入 PowerBI 的表之一,我有公司名称、借方金额、贷方金额和净额等列(计算列:借方金额-贷方金额).

现在是否可以从表中提取三个最高的公司名称,即借方、贷方或净额较高,并将其显示在磁贴上?可能是通过使用 DAX 或 OOTB 创建度量?它应该看起来像:

最高票房 第二票房 第三票房12000(净额) 10000(净额) 5000(净额)公司名称 公司名称 公司名称

我正在设想上述瓦片,一旦数据源表中的任何内容更新,它们就会动态变化.不确定这是否可以使用 DAX,我愿意接受建议.任何帮助将不胜感激.谢谢.

解决方案

DAX 有一个

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.

解决方案

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.

这篇关于如何显示表格中记录的前 3 个最高金额信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆