Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I work with Qlik Sense. I need to get a list of customers who bought an X product.
That X product is the most sold in the current year.
To obtain it, I used the function "firstsortedvalue (ProductName, -Ventas)" that returns the product with the highest sales value.
It shows it in a KPI and it is with respect to the selected year, if a year has not been selected then it obtains by default the one of the most recent year.
I already verified that and in effect I obtain the product with the most sales (money, not volume by quantity).
But now I have to show a table with exclusively the customers that bought that product and their purchase amount.
I have as Dimension: Clients
I have as Measure: sum (sales)
May be this
Sum({<ProductName = {"$(=FirstSortedValue(ProductName, -Ventas))"}>}sales)
May be this
Sum({<ProductName = {"$(=FirstSortedValue(ProductName, -Ventas))"}>}sales)
Excellent, Thanks. Keep in touch
I would like them to be seen from the most recent year. Because, by default it shows all the costumers who have bought during all these years, from 2004 to 2009.
May be this
Sum({<ProductName = {"$(=FirstSortedValue(ProductName, -Ventas))"}, Year = {"$(=Max(Year))"}>}sales)
Excellent. Thank you Sunny
I will have to do that. I'm trying do a comparison of products, where I need to find my most sold product that wasn't sell the previous year.
May be this
Sum({<ProductName = {"$(=FirstSortedValue({<ProductName = e({<Year = {$(=Max(Year) - 1)}>})>}ProductName, -Ventas))"}, Year = {"$(=Max(Year))"}>}sales)