Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Gewoodruff
Frequent Visitor

Revenue Per Capita

Hi All,

 

I have been trying to figure this out for a while but I am stumped. 

 

I am trying to calculate "revenue per country/ popluation of the country"

 

the data is structued in the following way, each line represents a transaction and the population is the total for each country each line:

Countyrevenuepopulation 
China146020000000 
China253920000000 
france12451248263 
france23541248263 
italy389386297 
1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Gewoodruff ,

Here are the steps you can follow:

1. Create calculated column.

Column =
DIVIDE(
SUMX(FILTER(ALL('Table'),'Table'[County]=EARLIER('Table'[County])),[revenue]),
MAXX(FILTER(ALL('Table'),'Table'[County]=EARLIER('Table'[County])),[population]))

2. Result:

vyangliumsft_0-1661497857631.png

If you need pbix, please click here.

Revenue Per Capita.pbix

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Gewoodruff ,

Here are the steps you can follow:

1. Create calculated column.

Column =
DIVIDE(
SUMX(FILTER(ALL('Table'),'Table'[County]=EARLIER('Table'[County])),[revenue]),
MAXX(FILTER(ALL('Table'),'Table'[County]=EARLIER('Table'[County])),[population]))

2. Result:

vyangliumsft_0-1661497857631.png

If you need pbix, please click here.

Revenue Per Capita.pbix

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

davehus
Memorable Member
Memorable Member

Hi @Gewoodruff ,

 

Add a step in powerquery to group the data first. So sum of revenue and max of population. This will give you a normalized dataset to work with.

 

Did I help you today? Please accept my solution and hit the Kudos button.

PVO3
Impactful Individual
Impactful Individual

Best is to normalize your data.

 

If you are looking for a measure, you can do something like:

DIVIDE(FIRSTNONBLANK('Table'[population],1), SUM('Table'[revenue]))

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.