Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear community,
I would like to calculate the revenue per capita for a product in a specified country.
I tried to put this into a dax expression, without success.
My data structure is as follows:
Table A
| Country | Product | Revenue |
| Country A | Product A | 100 |
| Country A | Product B | 200 |
| Country B | Product A | 50 |
| Country B | Product C | 100 |
| … |
Table B
| Country | Population |
| Country A | 100000 |
| Country B | 200000 |
| Country C | 50000 |
| … |
Table A and Table B are linked in both ways on the column "Country"
I have tried this DAX expression without success, for every product I get the same value.
Solved! Go to Solution.
Hi @skean21 please create this measure in tableA.
Measure =
VAR _country = MAX(TableA[Country])
VAR _population = CALCULATE(SUM(TableB[Population]),TableB[Country]=_country)
VAR _revenue = SUM(TableA[Revenue])
RETURN DIVIDE(_revenue,_population,0)
Hi @skean21 please create this measure in tableA.
Measure =
VAR _country = MAX(TableA[Country])
VAR _population = CALCULATE(SUM(TableB[Population]),TableB[Country]=_country)
VAR _revenue = SUM(TableA[Revenue])
RETURN DIVIDE(_revenue,_population,0)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 18 | |
| 12 | |
| 11 |