Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to get the below scenario work,
Lets say I have 3 different product types and I calculate the total cost(for each product) and total cost of all products and display them in a text box. Now I want to choose a particular product using the list box and should have one slider with a variable to increase the sale count of the product selected and see the estimated value of the total cost for each and all products.
TotalCostof All Products = (AverageIncomeoftheProduct1 * CountIncrease)+(AverageIncomeoftheProduct2 * CountIncrease)+(AverageIncomeoftheProduct3 * CountIncrease)
AverageIncomeoftheProduct= TotalIncome/No of units sold
Since I have 1 slider and 1 variable how would I make sure the variable is set to the correct product so the total cost is increased by only the product chosen.
I am using set analysis on the product type in my expressions.
Thanks
Hey,
Please check out the attached file and see if it helps you. This is a basic qvw with simple calculations. You can tweak it to your needs.
Hope it guides you in the right direction
Thanks
AJ
Thanks for your quick reply.This is closer. But when I choose the product, I still need to see other products in the chart/table with their actual value in both actual and estimated column. Also the variable value adds the same amount to all the products. But I want it to increase only for the selected product.
The way I designed it the slider works as per your request for the text objects. Did you check the way the three text objects were working when a product is selected and you change the slider?
Edit: So you want that feature in the table? Lemme give it a whirl.
I do see it. But how about displaying the total of all the products in the text even though I choose a product?
How about this one.
I get it. But lets do this, I added count to the sample you did and changed the slider to increase the count.
Attaching the modified sample. I may be complicating the scenario but this is how exactly I would need to produce.
I did not modify the texts that display the total cost and the individual products.
I used the below formula in the Ball text box
=(sum({<Product={'Ball'}>}Amount)/sum({<Product={'Ball'}>}Pcount)) //Average value
*(sum({<Product={'Ball'}>}Pcount)+
if(GetFieldSelections(Product)='Ball',$(vCount),0)) // Original count+Slider Increment
The logic is AverageValue*(Original count+Increased Count)
Fixed it. This should meet your needs. The table works as per your wish.
Lemme know your thoughts
Here is the final QVW