The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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:
County | revenue | population | |
China | 1460 | 20000000 | |
China | 2539 | 20000000 | |
france | 1245 | 1248263 | |
france | 2354 | 1248263 | |
italy | 3893 | 86297 |
Solved! Go to Solution.
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:
If you need pbix, please click here.
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
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:
If you need pbix, please click here.
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
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.
Best is to normalize your data.
If you are looking for a measure, you can do something like:
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
141 | |
109 | |
108 | |
76 | |
63 |
User | Count |
---|---|
273 | |
129 | |
123 | |
101 | |
91 |