Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dushyant
Contributor III
Contributor III

Urgent help! Waterfall chart not subtracting discount from Gross Sales

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.

Waterfall.PNG

Labels (3)
1 Solution

Accepted Solutions
Kashyap_R
Partner - Specialist
Partner - Specialist

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

Thanks and Regards
Kashyap.R

View solution in original post

4 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi @dushyant 

I am getting the correct output.

If possible can u attach a sample qvf where you are not getting the output.

kashyap_0-1648702634249.png

Thanks and regards

Kashyap.R

 

Thanks and Regards
Kashyap.R
dushyant
Contributor III
Contributor III
Author

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?

Kashyap_R
Partner - Specialist
Partner - Specialist

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

Thanks and Regards
Kashyap.R
dushyant
Contributor III
Contributor III
Author

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😅.