Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to create a waterfall chart and I am trying to subtract the discount from the gross sales which is actually (unitprice*Quantity). So I have first added the measure gross sales by entering the formula Sum(unitprice*quantity) then I took Sum(Discount). But the subtotal is not actually subtracting the discount from the gross sales. I have attached the image please help!
The amount what I want is 13.32M but its showing 14.22M as yall can see. When I apply the complete formula as a measure i.e. Sum((UnitPrice * Quantity) * (1-Discount) ) then I am getting the right amount of 13.32M.
Hi @dushyant
The way you are summing up the discount is wrong you cant sum up the percentage and value.
I have made adjustment to the map and see the last sheet it will help you to understand these type of calculation in future.
Note : Don't share the apps in community create a sample what you want and remove all other development and I think you are new please keep in mind
Have a nice day
Thanks and Regards
Kashyap.R
Hi @dushyant
I am getting the correct output.
If possible can u attach a sample qvf where you are not getting the output.
Thanks and regards
Kashyap.R
Hi! I have attached the qvf...the last sheet namely Sales & Margin analysis is where I am trying to create the waterfall chart. Also, i want to know what expression have you used for discount and gross sales?
Hi @dushyant
The way you are summing up the discount is wrong you cant sum up the percentage and value.
I have made adjustment to the map and see the last sheet it will help you to understand these type of calculation in future.
Note : Don't share the apps in community create a sample what you want and remove all other development and I think you are new please keep in mind
Have a nice day
Thanks and Regards
Kashyap.R
Thank you! This is exactly how I wanted it to work. It did not strike me that I could have subtracted the net sales from the gross sales to get the discount. I am new to qlik sense, its been around two months since I started learning. Yes I will keep in mind next time to only share the doubt part in the qvf and not the whole app😅.