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

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.

Reply
gedwards1988
Frequent Visitor

Measure to calculaute GDP per capita per year per state

Good evening all

 

My data is structured as follows:

 

Year       State     Population     GDP

1997       AZ          10000            23497829

1997       AL           96050           35873809

 

So each state has a year, population and gdp.  How would I create a measure or any othe rmeans other than calculated column to calculate gdp per capita per state per year.

 

 

kind regards

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Hi, @gedwards1988 , you might want to refer to the attached file for calculation,

Screenshot 2021-01-09 102831.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

Hi, @gedwards1988 , you might want to refer to the attached file for calculation,

Screenshot 2021-01-09 102831.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Also accepted as a solution!!!

 

AlB
Super User
Super User

Hi @gedwards1988 

1. Place state and year in a table visual

2. Create this measure and place it in the visual:

GDPperCapita =
DIVIDE ( SELECTEDVALUE ( Table1[GDP] ), SELECTEDVALUE ( Table1[Population] ) )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors