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
jdecker999
Regular Visitor

help - i need to add a 3rd and 4th column to visual table that can calculate the difference and %

hi team, i created a visual from a table that is rows by weeknum, and columns by year i add the qty by year and group by weeknum.

 

i now need to take year 2023 and subract year 2022 and get the percentage change.power bi from 1 tablepower bi from 1 tableneeds to look like thisneeds to look like this

3 REPLIES 3
tamerj1
Super User
Super User

Hi @jdecker999 

most probably this possible but the solution is difficult to explain without a sample file. If possible please provide a dummy sample file. 

MAwwad
Solution Sage
Solution Sage

 

To add a third and fourth column to calculate the difference and percentage change between 2023 and 2022, you can create two new measures. Here are the steps:

  1. Go to the "Fields" pane and select the table you're working with.
  2. Click on the "New measure" button in the ribbon.
  3. For the first measure, use the following DAX formula:

 

 
Diff 2022-2023 = [2023] - [2022]
 
  1. For the second measure, use the following DAX formula:

 

 
% Change 2022-2023 = DIVIDE([Diff 2022-2023], [2022])
 
  1. Add these two new measures to the table visual, as columns.

This will give you two new columns in the table visual that show the difference between 2023 and 2022, and the percentage change between the two years.

thanks for suggestion, but the data is not in two separate columns in the fields table.  it is in the same column called qty and the same column called dateofservice. my visual above shows table created in visual by row by week and sum of qty by column- year.  so my question is, how to take the columns i see in the visual and create a percent from them?

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.