Forum Discussion
Filtering by data trend
- 9 years ago
Hi arcadefire4,
If I understand you correctly, you should be able to follow steps below to sorting out the businesses in decline.
I assume you have a table called 'Table1' like below.
1. Use the formula below to create a new calculate column in 'Table1'.
Is In Decline = VAR previousMonthSales = CALCULATE ( SUM ( Table1[Sales] ), ALLEXCEPT ( Table1, Table1[Business Name] ), PREVIOUSMONTH ( Table1[Month] ) ) VAR NextMonthSales = CALCULATE ( SUM ( Table1[Sales] ), ALLEXCEPT ( Table1, Table1[Business Name] ), NEXTMONTH ( Table1[Month] ) ) RETURN IF ( Table1[Sales] < previousMonthSales && Table1[Sales] > NextMonthSales && NextMonthSales <> 0, 1, 0 )2. Then you should be able to use the new create calculate column as Slicer or visual level filter to sorting out the businesses in decline.
Here is the sample pbix file for your reference. :smileyhappy:
Regards
Hi arcadefire4,
If I understand you correctly, you should be able to follow steps below to sorting out the businesses in decline.
I assume you have a table called 'Table1' like below.
1. Use the formula below to create a new calculate column in 'Table1'.
Is In Decline =
VAR previousMonthSales =
CALCULATE (
SUM ( Table1[Sales] ),
ALLEXCEPT ( Table1, Table1[Business Name] ),
PREVIOUSMONTH ( Table1[Month] )
)
VAR NextMonthSales =
CALCULATE (
SUM ( Table1[Sales] ),
ALLEXCEPT ( Table1, Table1[Business Name] ),
NEXTMONTH ( Table1[Month] )
)
RETURN
IF (
Table1[Sales] < previousMonthSales
&& Table1[Sales] > NextMonthSales
&& NextMonthSales <> 0,
1,
0
)
2. Then you should be able to use the new create calculate column as Slicer or visual level filter to sorting out the businesses in decline.
Here is the sample pbix file for your reference. :smileyhappy:
Regards
- arcadefire49 years agoNew MemberThanks very much, that's exactly what I was after!