Power BI - Highest value of every country

Hellion

New Member
Joined
Apr 2, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
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
Joined
Aug 4, 2017
Messages
1,096
Office Version
  1. 2016
Platform
  1. Windows
=
VAR Cntry=[Country]
RETURN CALCULATE(MAX(Table1[Deaths]),FILTER(Table1,[Country]=Cntry))
 

mart37

Well-known Member
Joined
Aug 4, 2017
Messages
1,096
Office Version
  1. 2016
Platform
  1. Windows
Why do want to summarize the values when you have accumulated values?
 

Hellion

New Member
Joined
Apr 2, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
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.
 

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top