Hello,
I wish to show the top 15 products by "seller" and show this data to each "seller".
Each "seller" can only see their own data due to Section access, so I am creating a separate table to allow this to be seen.
I have done the below so far for the first "seller" is there a way I can do this for all of them in one go?
I have a number of sellers and this list could grow, so I would prefer not to have to hard code in each seller.
TEMP:
Load
Max([Reporting Date]) as MAXDATE
FROM [lib://Data_Values.QVD](qvd);
let vTEMP=peek('MAXDATE');
drop table TEMP;
Top15:
Load
[Item_ID] as [Item_ID15],
[Seller_ID] as [Seller_ID15],
[Item_Description] as [Item_Description15]
FROM [lib://Data_Item.QVD](qvd);
Left Join
Load
Item_ID as [Item_ID15],
[Reporting Date] as [Reporting Date15],
"Sales Qty (All)" as [Sales Qty (All)15],
"Sales Value (All)" as [Sales Value (All)15]
FROM [lib://Data_Values.QVD](qvd)
Where [Reporting Date] =$(vTEMP);
Top15LM:
First 15
Load
[Item_ID15],
[Seller_ID15],
[Item_Description15],
[Sales Qty (All)15],
[Sales Value (All)15]
Resident Top15
Where [Seller_ID15] = 'Seller1'
Order By [Sales Value (All)15] desc;
Drop table Top15;