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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
CJANE
Helper I
Helper I

Differerence for two rows in a matrix visual from the same table

I have a scenario where I need to add a new row in a matrix to display the difference between a value in 2016 versus 2017.  The 2016 and 2017 value is sourced from the same table/column.  Any recommendations?

1 REPLY 1
Anonymous
Not applicable

Hi @CJANE,

Could you please post raw data of your table? I make a test using original table as shown in the following screenshot.
1.PNG

You can firstly add an index column into your current table, then create a new column using the DAX below, then create Matrix visuals.

Column = IF(Table[Cate]=LOOKUPVALUE(Table[Cate],Table[Index],Table[Index]-1),Table[Sales]-LOOKUPVALUE(Table[Sales],Table[Index],Table[Index]-1),0)

 

Thanks,
Lydia Zhang

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors