[英]Show a specific value using DAX in Power BI
I want to show a specific value in a card report, this is a cashflow example: 我想在卡报告中显示特定值,这是一个现金流示例:
The columns are: Data = Date
, Tipo = Type
(Cash in ( Entrada
) or (Cash out ( Saída
)), Valor = Valu
e, Saldo final de caixa = Final cash balance
. Saída
: Data = Date
, Tipo = Type
((入金( Entrada
)或(现金出( Saída
))), Valor = Valu
, Saldo final de caixa = Final cash balance
。
None of this columns are calculated columns. 此列都不是计算列。
So I just want to click on the Date slicer, select the day, and return the value of the Saldo final de caixa = Final cash balance
. 因此,我只想单击日期切片器,选择日期,然后返回Saldo final de caixa = Final cash balance
。
Start out by creating a simple "Sum" measure like this: 首先创建一个简单的“ Sum”度量,如下所示:
Final Cash Balance Sum := sum(table[Saldo final de caixa])
Then you can just reference this measure in a card and it will react to the date in the slicer you've selected. 然后,您可以在卡片中引用此度量,它将对您选择的切片器中的日期做出反应。
Since you can have multiple transactions a day, you will need to have either a timestamp or a rank for each transaction. 由于您一天可以进行多个交易,因此每个交易都需要有时间戳或等级。 Once this field is included in your model you could do something like this: 在模型中包含此字段后,您可以执行以下操作:
Final Cach Balance Sum := CALCULATE(Table[Saldo Final De Caixa]; FILTER(Table; Table[rank] = max(Table[rank])));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.