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: 
antonaks
Creator II
Creator II

Value with last update

Hello Colleagues!

I have an issue, and can't solve it.

For example, I have data like in table:

    

ClientDateUpdate timeResult
AAA03-05-1814:30910.29
AAA03-05-1813:25181.11
AAA03-05-1812:10616.89
AAA02-05-1815:40890.93
AAA02-05-1812:3025.52
BBB03-05-1819:48969.58
BBB03-05-1815:08759.28
BBB03-05-1813:34276.29
BBB03-05-1810:22493.25
BBB02-05-1812:10657.09
BBB02-05-1815:40516.63
CCC03-05-1814:30496.91
CCC02-05-1813:25499.3
CCC02-05-1812:10932.85

I what create expression with set analysis which will get values in latest update time, but group by client and day.

I know how it make in load script, but I need set analysis expression for use it in chart.


Final result should be like this -

    

Final result
AAA03-05-1814:30910.29
AAA02-05-1815:40890.93
BBB03-05-1819:48969.58
BBB02-05-1815:40516.63
CCC03-05-1814:30496.91
CCC02-05-1813:25499.3

Thanks for any help.

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Hi Anton,

Try this:

- add 2 dimensions, Client, Date

- add 4 expression

    max([Update time])

    FirstSortedValue(Result, -[Update time])

   max([Update time],2)

   FirstSortedValue(Result, -[Update time],2)


Br,

KC

Best Regards,
KC

View solution in original post

13 Replies
maxgro
MVP
MVP

in a straight table chart

- add 2 dimensions, Client, Date

- add 2 expression

    max([Update time])

    FirstSortedValue(Result, -[Update time])

1.png

Anil_Babu_Samineni

Check this?

Create Table

Dimensions - Client and Date

Expressions are

1) Time(Max([Update time]),'hh:mm')

2) FirstSortedValue(Result, -[Update time])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sasiparupudi1
Master III
Master III

expression

Time(Max(Aggr(Max([Update time]),Client,Date)),'h h:mm')

antonaks
Creator II
Creator II
Author

Hello everybody. Thank you for help. I'm sorry but I forgot mention one special thing.

In final table I need compare last update value with previous in the same day.

jyothish8807
Master II
Master II

Hi Anton,

Try this:

- add 2 dimensions, Client, Date

- add 4 expression

    max([Update time])

    FirstSortedValue(Result, -[Update time])

   max([Update time],2)

   FirstSortedValue(Result, -[Update time],2)


Br,

KC

Best Regards,
KC
jyothish8807
Master II
Master II

Pfa

Best Regards,
KC
antonaks
Creator II
Creator II
Author

Thank you very much!

jyothish8807
Master II
Master II

You are welcome

Best Regards,
KC
antonaks
Creator II
Creator II
Author

I'm sorry.

Maybe you can help me again.

I still have problem with FirstSortedValue function.
Expression returned sum() for only one Client. I think I should use Aggr function, but I don't know how to input it in my expression.

Untitled.png