Power Bi Group排名

时间:2020-02-17 15:24:23

标签: powerbi

你能帮我吗?我希望在过滤范围内(按日期过滤)分配等级。告诉我,我做错了什么? CustomerSaleIndex1 = VAR CurrentOrderDate = \'public _smsnt_delete \'[date_transaction] VAR CurrentOrderTr = \'public _smsnt_delete \'[transaction_id] VAR CurrentCustomerKey = \'public _smsnt_delete \'[[card_number] RETURN RANKX(E \ NT(\ FILTER(ALL '); \'public _smsnt_delete \'[card_number] = CurrentCustomerKey); \'public _smsnt_delete \'[date_transaction] ;; ASC; Dense)

1 个答案:

答案 0 :(得分:0)

关于过滤器功能中的分隔符,您是否在逗号分隔符“ ”上使用分号“ ; ”?

您还已经将CurrentOrderDate声明为变量,为什么不使用它。另一方面,为什么还要声明CurrentOrderTr?由于您没有在函数中使用它:

CustomerSaleIndex1 = 
VAR CurrentOrderDate = 'public _smsnt_delete\'[date_transaction] 
VAR CurrentCustomerKey = 'public _smsnt_delete\'[card_number] 


RETURN 
RANKX(FILTER(ALLSELECTED('public 
_smsnt_delete\'),'public_smsnt_delete\'[card_number] = CurrentCustomerKey),
CurrentOrderDate,,ASC,Dense)

https://docs.microsoft.com/en-us/dax/rankx-function-dax