Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am new to power BI and trying it out with a covid-19 dataset.
I want to calculate the number of cases as a percentage of the total population. But first I need to calculate the total number of cases by region.
My data looks like the following:
Date | Cases | Deaths | Country Code | Population Data |
08/04/2020 | 10 | 22 | GBR | 66488991 |
07/04/2020 | 43 | 10 | GBR | 66488991 |
06/04/2020 | 7 | 12 | GBR | 66488991 |
08/04/2020 | 16 | 7 | USA | 327167343 |
07/04/2020 | 9 | 6 | USA | 327167343 |
06/04/2020 | 29 | 9 | USA | 327167343 |
Hi @Anonymous ,
I would split the data into two tables.
Table: Cases
- Date
- Cases
- Death
- Country Code
Table: Country
- Country Code
- Populatoin Data
n:1
Cases <---- Country
Hi @Anonymous ,
Quick and Dirty
Measure = DIVIDE(SUM('Table'[Cases]),AVERAGE('Table'[Population Data]))
Hi @mwegener
Thanks for your help!
I however didn't mention that first I need to sum the cases by country. Is there a way to group rows?
thanks
Hi @Anonymous ,
Sorry for that, but we cannot understand your requirment clearly, Could you please show the exact expected result based on the tables that you have shared? Do you want to show the result in the table visual?
Best regards,
Hi @Anonymous ,
what do you want to group?
A grouping is usually done via query by the visual?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |