Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare an amount for different years

Hello everyone,

I would like to compare the sales amount for each of my customer for different years and be able to know if the sales amount for a customer in 2017 is upper or lower than in 2016.

For example, if one of my customer in 2016 had a sales amount of 1M€ and 950k€ in 2017 i would like to display the 2017 amount in red.

This should be done in a pivot table with my "Customers" and the "Years" as dimension and my "Sales Amount" as a measure

Don't hesitate to ask me further details if my explanation aren't enough clear.

Thanks in advance,

Florian

15 Replies
Not applicable
Author

Hi,

I would like to have :

2014 vs 2015

2015 vs 2016

2016 vs 2017?

Not applicable
Author

Try this

if(aggr(rank(sum(SalesAmount1)),Customer1,Product1,Year1)=1,red(),Green())

hemeshreddy
Partner - Contributor III
Partner - Contributor III

Hi,

PFA

Regards,

Hemesh

srishsum2017
Creator
Creator

Hi Plz check the attached qvf

Sumit Kumar Srivastava
Not applicable
Author

Thanks for your answer Sumit,

But unfortunately it's not exactly what I want. The problem in your solution is that I will have to update manually my table each time I have a new year.

Not applicable
Author

in text color expression you write this expression it will give particular color.

Try this

if(aggr(rank(sum(SalesAmount)),Customer,Product,Year)=1,red(),Green())