Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My requirement is to take count of product owners for the dimension products which having max sales.
Count(owners) from products have max sales
Example
Product | Owners | Sales | Country | Manager | Contract_ID |
A | Ram | 5 | Canada | John | A1 |
A | Raj | 1 | China | Puja | A2 |
A | Siva | 7 | India | Steve | B1 |
A | Anu | 23 | Germany | Aziza | A2 |
A | Priya | 89 | India | Ozen | A1 |
B | Vani | 1 | London | Anu | A1 |
B | Priya | 23 | China | Ozen | A2 |
B | Venkat | 89 | Canada | Wasim | A1 |
try this
Data:
//LOAD *, AutoNumber(Product&Owners&Sales,Product) as Rank;
LOAD * INLINE [
Product, Owners, Sales, Country, Manager, Contract_ID
A, Ram, 5, Canada, John, A1
A, Raj, 1, China, Puja, A2
A, Siva, 7, India, Steve, B1
A, Anu, 23, Germany, Aziza, A2
A, Priya, 89, India, Ozen, A1
B, Vani, 1, London, Anu, A1
B, Priya, 23, China, Ozen, A2
B, Venkat, 89, Canada, Wasim, A1
];
LOAD *, AutoNumber(Product&Owners,Product) as Rank
Resident Data
order by Sales Desc;
drop table Data;
Expression = COUNT({<Rank={1}>}Owners)
@UserID2626 In UI, you can simplify with analysis like
Count({<Product={"$(=Max(Sales))"}>} owners) // This case it returns 2.