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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Noogin
Frequent Visitor

Difference between two columns whose values are in the same column

Greetings,
OK, so I have spent significant time trying to figure this out and I just can't seem to get anything to work. If this has been answered I have had no luck finding an answer.
I have a table that sums enrollment by the number of days prior to the first day of classes. I have data for the current term being registered for and in this case the previous year’s enrollment by the same countdown value. This way we are comparing enrollment to the same number of days prior to the first day of classes for each year. Please see the example data below.

Noogin_0-1700688465409.png

In Power BI I can produce this:

Noogin_1-1700688499221.png

 

Below is an example of what I need to create. That is two additional columns for "Difference" between 2023 and 2024 and the "Percent difference" between 2023 and 2024. The programming is dynamic so the next iteration will become 2024 and 2025. In other words, the Year values are not static so I cannot use the "2023" and "2024" values in any DAX.

 

Noogin_2-1700688538240.png

 

Thank you all for your time and help,
Gary

 

 

 

2 REPLIES 2
TomMartens
Super User
Super User

Hey @Noogin ,

 

please create a pbix file containing sample data that still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix to OneDrive, Google Drive, or Dropbox and share the link. If you are using a spreadsheet to create the sample data instead of the manual input data share she spreadsheet as well.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hey Tom,

I believe I have the link to my Dropbox here: for an example of what I am trying to do.

https://www.dropbox.com/scl/fi/1q5rcnxa844vf43th8bgm/Forum-Example.pbix?rlkey=hl6889iaw3ewv9cq5vpctg...

 

Thanks!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.