
Contributor
2019-01-16
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monthly comparison showing best and worst
Hi everyone, just need help again.
I have sellers and their sales.
I was asked to show only those sellers who were better this month then previous month.
And vice versa show those who were worse this month then previous.
I've tried to make set analysis like this:
sum({<month={$(=Max(Month))}>} Quantity*ProductCost) - sum({<month={$(=Max(Month-1))}>} Quantity*ProductCost)
but got only zeros.
Thanks for your help.
Max
948 Views
3 Replies


Master II
2019-01-16
02:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in which object are you using this exactly? if you can describe a bit more.
Try this may be assuming you have dates properly defined and the expression is what you need
sum({<month={"$(=Max(Month))"}>} Quantity*ProductCost)
- sum({<month={"$(=Max(Month)-1)"}>} Quantity*ProductCost)
Try this may be assuming you have dates properly defined and the expression is what you need
sum({<month={"$(=Max(Month))"}>} Quantity*ProductCost)
- sum({<month={"$(=Max(Month)-1)"}>} Quantity*ProductCost)
Learning never stops.
938 Views

Contributor
2019-01-16
02:44 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have sales list for year 2013.
It states date of sale, seller, product ID and selled Quantity.
ProductCost is defined in different table.
It states date of sale, seller, product ID and selled Quantity.
ProductCost is defined in different table.
921 Views

MVP
2019-01-16
05:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Simplest way :
sellers who were better this month then previous month:
Create a bar chart:
as dimensions:
Month
Seller
as a measure:
aggr(if(Sum(Value)>=above(sum(Value)),sum(Value),0),Seller,Month)
sellers who were worse this month then previous month:
Create a bar chart:
as dimensions:
Month
Seller
as a measure:
aggr(if(Sum(Value)<above(sum(Value)),sum(Value),0),Seller,Month)
here's a result per analogy :
