Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

expression to calculate discount

Hi All,

Following is the expression to calculate discount%. Its giving wrong value

Here sales value is without tax

=((sum({stateA< Year = {"$(=Max(Year)-2)"}>} quantity_sold * MRP_INR)

- sum({stateA< Year = {"$(=Max(Year)-2)"}>} quantity_returns * MRP_INR))


-


( sum({stateA< Year = {"$(=Max(Year)-2)"}>} [sales  value])))


/


(sum({stateA< Year = {"$(=Max(Year)-2)"}>} quantity_sold * MRP_INR)

- sum({stateA< Year = {"$(=Max(Year)-2)"}>} quantity_returns * MRP_INR))

2 Replies
PrashantSangle

Hi,

can you explain little bit more.

how your data look like?

why are u using alternate state?

what is the expected output?

what challenges are you facing?

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Paint1.png

Here under discount column I am getting higher value as expected and I am using three different multibox for current year, previous year and before previous year