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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Razorbx13
Post Patron
Post Patron

Row Difference

I have the below matrix.  The measure is a single field (VALUE) which results from a union of several tables (one being office visits).  Each row total comes from a single table.  The example below shows Office Visits.  This table is unioned into 5 other tables to give me specific values by Quarter, by Month as the headers.  The next row level is year of the VALUES.  So I need to create a row below 2021 for each month for each row heading (in this instance Office Visits and New Visits), that is the difference of 2020 and 2021.  Is there an easy way to do this?  Thanks in advance.  

 

2021-05-12_14-57-00.jpg

2 ACCEPTED SOLUTIONS
selimovd
Super User
Super User

Hey @Razorbx13 ,

 

sure, you can create a measure with the value from the previous year with SAMEPERIODLASTYEAR :

Measure Last Year = CALCULATE( [myMeasure], SAMEPERIODLASTYEAR( DateTable[Date] ) )  

 

Then you just have to subtract one measure from the other and you have your result.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

So will this be a measure I can place RIGHT BELOW the 16298, 15727, 4027, etc.?  Will try it out tonight!  

View solution in original post

3 REPLIES 3
Razorbx13
Post Patron
Post Patron

I guess I can help and make a little clearer.  What I will be showing once all the data is there is a 2020 "positive" number and a 2021 "positive" number.  The total line needs to show the net of these two numbers, not the sum.  Is that doable?  I need to show each number as a positive, but in the total line need to show the net.  Is that doable?

selimovd
Super User
Super User

Hey @Razorbx13 ,

 

sure, you can create a measure with the value from the previous year with SAMEPERIODLASTYEAR :

Measure Last Year = CALCULATE( [myMeasure], SAMEPERIODLASTYEAR( DateTable[Date] ) )  

 

Then you just have to subtract one measure from the other and you have your result.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

So will this be a measure I can place RIGHT BELOW the 16298, 15727, 4027, etc.?  Will try it out tonight!  

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.