# Power BI - Highest value of every country

#### Hellion

##### New Member
Hi everyone!

I'm totally new in Power Bi and could use a hand here after a few hous getting nowhere.

I have a table with columns Date, Country, Confirmed, Recovered, Deaths (I bet you realised is about the pandemic!) where the dates are increasing day by day for every country with the number of Confirmed, Recovered and Deaths increasing because they are showing accumulated values. Therefore, the latest date is every the highest value of Confirmed, Recovered and Deaths before going into the next country and starting over again. Like:

Date Country Confirmed Recovered Deaths
22/01/2020 Albania 1 0 0
23/01/2020 Albania 5 3 2
01/02/2021 Albania 500 470 30
23/01/2020 UK 10 8 2
25/07/2020 UK 100 70 30
07/02/2021 UK 1000 800 200

I would like to do 2 things. First, to get only the latest/highest value of every country so I can build a bar chart with every country values. Second, summarise all the values per date to create a timeline.

How can I do this?

Thanks

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### mart37

##### Well-known Member
=
VAR Cntry=[Country]
RETURN CALCULATE(MAX(Table1[Deaths]),FILTER(Table1,[Country]=Cntry))

#### mart37

##### Well-known Member
Why do want to summarize the values when you have accumulated values?

#### Hellion

##### New Member
I don´t want to summarise all values from a country. I´m trying to show in, for example, a bar chart, only the accumulated values, in other words, the last line of every country.

Replies
8
Views
94
Replies
6
Views
180
Replies
0
Views
116
Replies
1
Views
143
Replies
5
Views
383

1,141,002
Messages
5,703,663
Members
421,310
Latest member
CindaH

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back