通过子类别DAX计算最大

发布于 2025-01-26 21:04:07 字数 351 浏览 2 评论 0原文

您好,我是DAX中的新手,

我想通过子类别和类别来计算最大价值。

就像Max(Max(子类别)类别)一样,此示例解释了我的需求。 类别子类别价值

动物狮子5

食物番茄4

食物马铃薯6

动物狗5

植物2植物

最大值

动物5(如果我们有2个子类别具有相同的价值,他随机选择一个)

食物6(马铃薯)

植物2

示例

Hello I m newbie in dax ,

I want to calculate the max of value by subcategory and category.

it s like Max(Max(subcategory)category ) this example explain what I need .
Category Subcategory value

animal lion 5

food tomato 4

food potato 6

animal dog 5

plants flower 2

Category Max value

animal 5 ( if we have 2 subcategory with same value he choose randomly one )

food 6 ( potato )

plants 2

example

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人九事 2025-02-02 21:04:07

在Power BI中,您不必计算任何内容。您只需使用视觉即可获得所需的结果。导入数据,在报告中拖动表观视野。将类别和值拖动。

作为最后一步,将价值设置为最大,您就完成了

In Power BI, you do not have to calculate anything. You can simply use a visual to get teh result you want. Import the data, drag the table-visual on the report. Drag the Category and the value on the table.

As last step, set the value to the Max and you are done..

Enjoy!

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文