Forum Discussion
Adding Up Down Arrows to matrix/table
Hi
I have a number of matrix tables in a report, i'd like to add dynamic arrows to show an increase/decrease based on the current week vs the previous week.
Sample of my matrix:
On each row I want to add at the end if there was an increase or decrease for example between week 45 vs week 44.
Is this a possibility?
- Anonymous2 years ago
Hi Anonymous
You can refer to the following solution
Sample data
Week table
Relationship
1.Create a measure
Measure = VAR _pre = CALCULATE ( SUM ( 'Table'[Value] ), 'Table (2)'[Week] = SELECTEDVALUE ( 'Table (2)'[Week] ) - 1 ) RETURN SWITCH ( TRUE (), SUM ( 'Table'[Value] ) < _pre, 1, SUM ( 'Table'[Value] ) = _pre, 2, SUM ( 'Table'[Value] ) >= _pre, 3 )2.Then put it to the conditional formatting of the value in the matrix
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- vanessafvgCommunity Champion
it is possible.
- you need a date table
- calculate a this weeks measure
- calculate the previous weeks value
- compare the measures and use conditional formatting to provide how the arrows based on the compare result
sql bi have all the patterns you need i suggest you use this link, https://www.daxpatterns.com/week-related-calculations/
- AnonymousNot applicable
Hi Anonymous
You can refer to the following solution
Sample data
Week table
Relationship
1.Create a measure
Measure = VAR _pre = CALCULATE ( SUM ( 'Table'[Value] ), 'Table (2)'[Week] = SELECTEDVALUE ( 'Table (2)'[Week] ) - 1 ) RETURN SWITCH ( TRUE (), SUM ( 'Table'[Value] ) < _pre, 1, SUM ( 'Table'[Value] ) = _pre, 2, SUM ( 'Table'[Value] ) >= _pre, 3 )2.Then put it to the conditional formatting of the value in the matrix
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.