Forum Discussion
Matrix Visual: Compare 2 coulumns
- Anonymous2 years ago
amitchandak Thanks for your contribution on this thread.
Hi dlogan ,
Whether your problem has been resolved? If yes, could you please mark your post as Answered?
Otherwise, you can create a measure as below and put it on Values option of matrix...
Difference = VAR _year = SELECTEDVALUE ( 'Table'[Year] ) VAR _category = SELECTEDVALUE ( 'Table'[Category] ) VAR _preyear = SUMX ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Category] = _category && 'Table'[Year] = _year - 1 ), [Total Acres] ) RETURN [Total Acres] - _preyearIf the above ones can't help you figure out, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
amitchandak Thanks for your contribution on this thread.
Hi dlogan ,
Whether your problem has been resolved? If yes, could you please mark your post as Answered?
Otherwise, you can create a measure as below and put it on Values option of matrix...
Difference =
VAR _year =
SELECTEDVALUE ( 'Table'[Year] )
VAR _category =
SELECTEDVALUE ( 'Table'[Category] )
VAR _preyear =
SUMX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Category] = _category
&& 'Table'[Year] = _year - 1
),
[Total Acres]
)
RETURN
[Total Acres] - _preyear
If the above ones can't help you figure out, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards