如何在Power bi中创建将由日期切片器响应的动态排名 [英] How to create dynamic ranking that would respond by date slicer in Power bi

查看:550
本文介绍了如何在Power bi中创建将由日期切片器响应的动态排名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只需要基于 TransactionDate DESC为每个 ClaimantID 创建一个排名列。



示例.pbix文件可在此处找到:



结果应如下所示:



解决方案

更改您的排名计算

 排名= 

RANKX(
CALCULATETABLE(
个索赔人
,ALLEXCEPT(索赔人,索赔人[ClaimNumber],索赔人[ClaimantID])
),Claimants [TransactionDate] ,, DESC,Dense

目前也在表格中同一天有多笔交易,您在对排名进行汇总。将其更改为最低等级即可获得正确的结果。


I simply need to create ranking column for each ClaimantID based on TransactionDate DESC.

example .pbix file can be found here: https://www.dropbox.com/s/9dsnylng70t5a8i/Count%20Open%20and%20Closed%20at%20Point%20of%20time.pbix?dl=0

On a picture below I have two unique claims with TransactionDate.

So how can I RANK ClaimantID by TransactionDate in descending order?

I tried to create column Rank. But it does not give me desirable result:

Rank = 

    RANKX(
        CALCULATETABLE(
            Claimants
            ,ALLEXCEPT(Claimants,Claimants[ClaimantID])
                      ),Claimants[TransactionDate]
        )

Result should look like this:

解决方案

Change you Rank Calculation:

Rank = 

    RANKX(
        CALCULATETABLE(
            Claimants
            ,ALLEXCEPT(Claimants,Claimants[ClaimNumber],Claimants[ClaimantID])
                      ),Claimants[TransactionDate],,DESC,Dense
        )

Also currently in the table there are multiple transactions for the same date and you are summing up the rank. Change it to minimum of rank to get the correct results.

这篇关于如何在Power bi中创建将由日期切片器响应的动态排名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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