Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vja
Contributor
Contributor

I want to know Last order value by using formula

Hi Qlik Team,

Please let me know how use formula for below data points

Data Points

1) Last order Bill value 
2) Last order discount coupon used 
3) Last order name of Product Name.

Labels (2)
1 Reply
jcmachado
Contributor III
Contributor III

In Qlik , you can use the following formulas to extract the last order Bill value, last order discount coupon used, and last order name of Product Name:

  1. Last order Bill value: You can use the Max() function to find the maximum Bill value in your data.

=Max(BillValue)

  1. Last order discount coupon used: You can use the Max() function to find the discount coupon used in the last order.

=Max(DiscountCoupon)

  1. Last order name of Product Name: You can use the FirstSortedValue() function to find the name of the product in the last order.

=FirstSortedValue(ProductName, -Date)

Where "BillValue" is the field name of the Bill value, "DiscountCoupon" is the field name of the discount coupon used, "ProductName" is the field name of the product name, and "Date" is the field name of the date of the order.

Please note that this is just an example, you might want to adjust the formula according to your data and needs.