简体   繁体   中英

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 .

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 .

Start out by creating a simple "Sum" measure like this:

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])));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM