Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to a Text box to list the Top companies to product variance of this month. This is the formal have have now, but it isn't showing the right number 1 product variance.
Set Expression:
FirstSortedValue({<[Global Manufacturer]>} [Product], -Aggr(Sum({<[Global Manufacturer]>} [Sales in Units current Month] - [Sales in Units Past Month]), [Product ]), 1)
Hi, share the data along with the anticipated outcomes.
This is my current code:
= '#1 ' &
FirstSortedValue({<[Company]>} [Product], -Aggr(Sum({<[Global Manufacturer]>} [Current Month] - [Previous Month]), [Product]), 1)
& ' ' &
Num(Max(Aggr(Sum({<[Company]>} [Current Month] - [Pervious Month]), [Product]) ))
The anticipated outcome will look like this:
Top 1 Company A
#1 Product A $869000, #2 Product D $655000, #3 Product G $480000
With the data looking like this, down below.
Company | Product | Pervious Month | Current Month | Varience |
Company A | Product A | $298,000 | $1,167,000 | $869,000.00 |
Company B | Product B | $926,000 | $1,169,000 | $243,000.00 |
Company C | Product C | $416,000 | $1,213,000 | $797,000.00 |
Company A | Product D | $1,781,000 | $2,436,000 | $655,000.00 |
Company C | Product E | $712,000 | $1,254,000 | $542,000.00 |
Company D | Product F | $1,866,000 | $2,349,000 | $483,000.00 |
Company A | Product G | $2,940,000 | $3,420,000 | $480,000.00 |