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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors