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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors