Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
senselearner
Contributor
Contributor

Only show two consecutive negative value number

 

Hi  Team,

I need your help to limit results. I only need to show stores that have two consecutive negative numbers. Here is my set Analysis.

((Sum({$<ReportDate={">=$(=MonthStart(AddMonths(Today(),-3)))<=$(=MonthEnd(AddMonths(Today(),-1)))"}>} Cash)+
Sum({$<ReportDate={">=$(=MonthStart(AddMonths(Today(),-3)))<=$(=MonthEnd(AddMonths(Today(),-1)))"}>} Check)+
Sum({$<ReportDate={">=$(=MonthStart(AddMonths(Today(),-3)))<=$(=MonthEnd(AddMonths(Today(),-1)))"}>} CreditCard))
/
(Sum({$<mpd_dtm_ReportDate={"$(=Last_Day_Last_Month)"}>}[Actual Rent])+
Sum({$<mpd_dtm_ReportDate={"$(=Last_Day_Last_2Month)"}>}[Actual Rent])+
Sum({$<mpd_dtm_ReportDate={"$(=Last_Day_Last_3Month)"}>}[Actual Rent]))-1)

 

I only need to show Store 88 since Dec & Jan have negative numbers.

senselearner_0-1645326732729.png

 

Labels (3)
2 Replies
vikasmahajan

Hi 

You can use following logic

=if(your exp < 0, your exp)

ex:

if(sum(sales) < 0 , sum(Sales))   

 

Note :  replace your formula in sales

Hope this works for you .

Vikas

 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
senselearner
Contributor
Contributor
Author

Hi Vikas,

Thank you so much for your suggestion.  The expression is only pulling negative numbers. What I want to show is if there are two negative months in a row, then the store should appear.