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

Calculate Value of last Order

Hi all

with the formula max(Fact.Date_Ordered) I can calculate the date of the last order.

How can I calculate the value of the last Order?

The formula to calculate the revenue is  sum({<Fact.Type = {'Sales'}>}Fact.Net_Rev_EUR))

Thanks for your help

5 Replies
tresesco
MVP
MVP

Use FirstSortedValue(), like:

FirstSortedValue( Aggr(sum({<Fact.Type = {'Sales'}>}Fact.Net_Rev_EUR)), Date) , -Date)

Not applicable
Author

sum({<Fact.Type = {'Sales'}, Fact.Date_Ordered = {"=$(=max(Fact.Date_Ordered))"}>}Fact.Net_Rev_EUR))

alexandros17
Partner - Champion III
Partner - Champion III

try this and let me know


sum({<Fact.Type = {'Sales'}, Fact.Date_Ordered = {'$(=max(Fact.Date_Ordered))'}>}Fact.Net_Rev_EUR))

Not applicable
Author

Unfortunately all 3 suggestions doesn't work...

As Dimension I have "Customer_Sales.Name" in the Table.

Not applicable
Author

can you attach a sample app