Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
Need to calculate Percentage for products.
I have one field called Product in that i have valves like Apple, Banana,Grapes,Mango.
I want to calculate Percentage for each product for based on Month.
For Example Sum(Product)=10000 In that Sum(Apple)=3000,Sum(Banana)=4000,Sum(Grapes)=2000,Sum(Mango)=1000
Let assume this data belongs 6 months now need to calculate percentage for each Product valve
Product Valve= Each Month valve/Sum(Product Valve)
Pls can any one help me how to write expression for this case.
Thanks in Advance
Pls can any one respond
I did not really understand your question, but I give it a try.
Consider this data set:
LOAD Product, Monthname(Month) as Month ,Amount inline [
Product,Month, Amount
Apple, 2020-08-01, 3000
Banana, 2020-08-01, 4000
Grapes, 2020-08-01, 2000
Mango, 2020-08-01, 1000
Apple, 2020-07-01, 5000
Banana, 2020-07-01, 6000
Grapes, 2020-07-01, 2000
Mango, 2020-07-01, 1000
Apple, 2020-06-01, 9000
Banana, 2020-06-01, 7000
Grapes, 2020-06-01, 2000
Mango, 2020-06-01, 1000
];
Is the image below close to your desired output or is it something else? Please explain.
Thanks for responding.
What i am looking is not this, The output should be like below attached file.
Thank You
Kindly can any one respond it Please.
Using this datamodel
LOAD Product, Monthname(Month) as Month ,Amount inline [
Product,Month, Amount
Apple, 2020-08-01, 3000
Banana, 2020-08-01, 4000
Grapes, 2020-08-01, 2000
Mango, 2020-08-01, 1000
Apple, 2020-07-01, 5000
Banana, 2020-07-01, 6000
Grapes, 2020-07-01, 2000
Mango, 2020-07-01, 1000
Apple, 2020-06-01, 9000
Banana, 2020-06-01, 7000
Grapes, 2020-06-01, 2000
Mango, 2020-06-01, 1000
];
You can use this expression.
sum( Amount)/sum(Total <Product> Amount)
How can we show same results in pivot table.
Pls help me
There should not be any issues using the expression in a pivot table as a measure.
The image below is from QlikView, but it will work similarly in QS.
I have used above expression in my case its showing below result
This one is before selection of month
After selection the month the result is like below, Pls help me how to resolve the issue