Forum Discussion
jwin2424
Resolver I
4 years agoGrab data from most recent row available
Hello, I am trying to create a Card visual to show the current balance of my account. In the example below, I would lilke to have the card display the balance from the most recent row in the dat...
- 4 years ago
jwin2424 please use the following
_Balance = CALCULATE ( MAX ( 'Table'[Balance] ), FILTER ( 'Table', VAR _mxIndex = CALCULATE ( MIN ( 'Table'[Index] ), ALL ( 'Table' ) ) RETURN 'Table'[Index] = _mxIndex ) )
jwin2424
Resolver I
4 years ago| A | B | C | D | E | |
| Posting Date | Description | Amount | Balance | Index | |
| 1 | 12/5/2021 | Groceries | -53.62 | 674.45 | 1 |
| 2 | 12/5/2021 | Gas | -42.81 | 728.07 | 2 |
| 3 | 12/5/2021 | Rent | -1800 | 770.88 | 3 |
| 4 | 12/5/2021 | Utilities | -213.12 | 2570.88 | 4 |
You'll have to forgive me, as I am still learning how to use Power BI. My table has the index column (created in edit query) and then I went to my visualization section and created a card. I made a measure (by selecting the table I wanted it for in the fields area and then selecting "add measure). I entered in the formula, and it looks like I got a massive balance in return.
The dats is pulled in decending order, so the most recent transaction is at the very top. I simple want the card to say "674.45."
Thank you for helping!