Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

sales Growth

Hi Community,


I have one scenario, I'm calculating Sales Growth .

My calculation: Max(Year)-Max(year-1)/Max(Year-1)

                        = (2017 sales-2016 sales)/2016 sales

Table:

ClientYearSalesBudget
A2017200015000
B2017140012500
C2017100013000
D2017159017250
E201765000
A201695025000
B2016120015870
C201659012750
D20169000
E201612360

My requirement:

Suppose 1. if i have previous values 0 sales, i have to show 0.01..

2. If i have both values 0.. Max year sales and previous year sales 0, i have to get rid of that..

how to compare data if i have both Zero's ??

I have to get rid of E client data, because both sales have Zero data..

Thanks in Advance......

5 Replies
rubenmarin

Hi Paul, E is there because has data for budget, to avoid this you can change the budget expression to only show budget when both sales are <>0.

Doing this and checking the option to 'Supress zero values' in presentation tab, E should dissapear.

paulwalker
Creator III
Creator III
Author

Hi Ruben,

I don't need to show budget, Here I'm calculating YoY sales only.

Suppose i have 2 years data 2017 and 1016

Maximum year 2017

Minimum Year 2016, so my previous year 2016

Now, if we have previous year (2016) sales 0, here taking 0.01, otherwise normal calculation.

like

(Sum({$<Year={$(=(Max(Year)))}> } Sales) - Sum({$<Year={$(=(Max(Year)-1))}> } Sales))

/

Sum({$<Year={$(=(Max(Year)-1))}> } Sales))

Suppose if i have max and min year Sales 0, i have to get rid of that client data...

Hope you understand...

antoniotiman
Master III
Master III

Hi Paul,

maybe this

If(Sum({$<Year={$(=(Max(Year)))}> } Sales) > 0 or Sum({$<Year={$(=(Max(Year)-1))}> } Sales) > 0,
IF(Sum({$<Year={$(=(Max(Year)-1))}> } Sales)=0, 0.01,
(Sum({$<Year={$(=(Max(Year)))}> } Sales) - Sum({$<Year={$(=(Max(Year)-1))}> } Sales))
/
Sum({$<Year={$(=(Max(Year)-1))}> } Sales
)))

Regards,

Antonio

paulwalker
Creator III
Creator III
Author

Exactly what I'm expecting,

but problem is if i have sales Negative values that will also go...

i think this will work fine

If(Sum({$<Year={$(=(Max(Year)))}> } Sales) <> 0 or Sum({$<Year={$(=(Max(Year)-1))}> } Sales) <> 0,
IF(Sum({$<Year={$(=(Max(Year)-1))}> } Sales)=0, 0.01,
(Sum({$<Year={$(=(Max(Year)))}> } Sales) - Sum({$<Year={$(=(Max(Year)-1))}> } Sales))
/
Sum({$<Year={$(=(Max(Year)-1))}> } Sales
)))

antoniotiman
Master III
Master III

Yes, if You don't filter negative values, then use <> instead >.

Regards,

Antonio