Forum Discussion
CJANE
Helper I
9 years agoDiffererence 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 recomme...
Anonymous
9 years agoNot 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.
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