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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
bv27718n
Helper II
Helper II

Help, how d I get % change?

Hi

I am new to power BI and have two issues:

I have to different data sets, one for 2020 and one for 2021. How can I show the percent change for each row?

 

Additionally in my data query, I have states in a column, I need to move these in order to break out the states by region not just all states? Problem is when I move the data it changes all my other data fields? I attached photos. I want to do membership the same way but be able to put different states by region in my visuals. Thanks so much!

bv27718n_0-1625754413562.png

bv27718n_1-1625754518623.png

 

 

17 REPLIES 17
v-henryk-mstf
Community Support
Community Support

Hi @bv27718n ,

 

Sorry, I don’t understand your needs. Can you describe it more accurately? It’s best to provide a screenshot of the desired result. I will answer you as soon as possible.

 

Best Regards,
Henry

 

bv27718n
Helper II
Helper II

I dont think I can create a custom colum to pull in the calcs but the data sets I am using are on seperate pagesthough. right?

bv27718n
Helper II
Helper II

https://drive.google.com/file/d/1xWl-pLZ3m6xinlepSwWI1j7mRxaTJjxl/view?usp=sharing

 

Thanks, I want to get the change from the 5.20 elite to 5.21 elite in the PF elite and QF elite sheets and then figure out how i can seperate the states so I can add visuals of by region

Awesome, thanks! So, I just continue to do that and I can add in a percent change column as well. How come you do not need the relationship there? I thought you did. 

 

 

Hi @bv27718n,

 

The Facts really are not related, you could have related on State 1 to 1 but that was not the case



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Hi @bv27718n,

 

Looking at your file, you do not need the relationship between the Elite 20 and 21 tables.

Below is a formula that will create a new column in your table with the other tables value

PF Life 2020 col = 
VAR _state = 'Elite 5.21'[State]
return 
CALCULATE(MAX('Elite 5.20'[PF life]), FILTER('Elite 5.20', 'Elite 5.20'[State] = _state))

 

you can then create the following measures to get the sums and variance

PF Life 2020 = SUM('Elite 5.21'[PF Life 2020 col])

pf life 2020 var = sum('Elite 5.21'[PF Life]) - sum('Elite 5.21'[PF Life 2020 col])

Result would look like this

richbenmintz_0-1625758843106.png

 

I have attached your file with my mods

 

To slice by Region, you will need to create a region table that contains each state and region then relate the table to the fact tables on the state. You will then use the the region to filter and slice your data.

 

Please review the following Microsoft docs for best practices for data modelling

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema 

 

I would also suggest that you store your facts in a single fact table with a period column to define the period that the fact belongs to rather than creating tables for each year, it is not a manageble or extensible solution.

 

Thanks,

 



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


awesome and for that table, is there anything that should be linked or any other steps to pull that info in?

Hi @bv27718n ,

 

Import the file into your Power BI Data Model and relate the table to your facts on the state column



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Okay, makes sense. I appreciate your help. I did have one last follow up, I am looking at what you did, how do you then add in the other colums likethe PF 2020? I would go into the elite 2020, create columns say for gold patron and patron and then go from there I take it.

 

Is there an easy way to create a "state region" table? where is that created? 

Hi @bv27718n ,

 

Follow the exact same pattern, create column in the table where the variance is by looking up the value from the corresponding table, then add your measures.

For the State Region Table you could use this csv and import into your model

https://github.com/cphalpert/census-regions/blob/master/us%20census%20bureau%20regions%20and%20divis... 



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


bv27718n
Helper II
Helper II

Are you able to create custom look up, to do the calc between two different data sets? I have one for membership 5.20 and 5.21, would you just link in order to see percent change for each?

bv27718n
Helper II
Helper II

thanks! does that help?

Hi @bv27718n ,

 

Please Share your pbix file, or an excel copy of the data, the data you have pasted does not import properly into Power BI



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


bv27718n
Helper II
Helper II

StatePF LifePF PatronPF Gold Patron 21PF Elite Mbrs 2021QF LifeQF PatronQF Gold PatronQF Elite MbrsPF/QF Gold Patron 21PF/QF Patron 21PF/QF Life 21

AK20002000000020
AL1440181950240933
AR1401151800181032
AZ7931831900191398
CA1083011113001303121
CO2637327318011947281
CT17001710010018
DE800820020010
FL75207728613518103
GA42104360606607102
HI40040000004
IA645204669390039420684
ID46104730030149
IL3387134640004017378
IN1560015616101701172
KS2374124245535349282
KY1700171400140031
LA10001020020012
MA15001500000015
MD31003150050036
ME70071001008
MI31011132281110212318
MN1378559144242214510571420
MO86218976307915162
MS16001680080024
MT16611168400411170
NC3410351800180152
ND22010221000001220
NE345243372215026329366
NH80080101018
NJ12001210010013
NM13001330030016
NV29002930030032
NY40104141050244
OH20880216143017011222
OK2100215220540273
OR47004750050052
PA11800118500500123
RI20020000002
SC1621191430171530
SD49914145271011121515509
TN3940433020320669
TX12291132115133131422237
UT30003010010031
VA3901401110121150
VT30250112313
WA11120113300302114
WI36493376112013311375
WV700730030010
WY73107400000173
richbenmintz
Resident Rockstar
Resident Rockstar

Hi @bv27718n,

 

Couple Suggestions:

1. Create a Region table that contains the State and Region it belongs to, then join that table to your facts, use the Region table to filter the fact data

2. Either Union your 2020 and 2021 data together and add a period column, more extensible as you add more periods || or created calc columns using lookups in the 2021 table to get the 2020 data you want to compare for each row, not as extensible for additional years.

 

If you are able to provide sample data as opposed to screen shots that would be very helpful.

 

Thanks, 



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Hi,

 

I am still confused. not sure what to do. how can I share data here? Thanks!!

Hi @bv27718n,

 

you can copy and paste the data into a table in the thread, or you can share a pbix through onedrive or google drive



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors