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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
fheidenstecker
Partner - Creator II
Partner - Creator II

Firstsorted Value

Hi there,

i have a question regarding firstsortedvalue, which is driving me nuts

I prepared an example: I have 2 different Values and an Id. I want to count the Event with the lowest Index. But whatever i try, it always shows me both values

My exprected Result is:

Header 1Header 2
ValueCount
Test12

Please see attached file.

This is just some sample data i created, cause i can't share my real data. The real data is a list of events for each date. I want to count for each day what event occured first 😉

Thanks,

Fabian

1 Solution

Accepted Solutions
sunny_talwar

Try this

=Count(Aggr(If(Value = FirstSortedValue(TOTAL <Day> Value,ID), 1), Day, Value))

View solution in original post

2 Replies
sunny_talwar

Try this

=Count(Aggr(If(Value = FirstSortedValue(TOTAL <Day> Value,ID), 1), Day, Value))

fheidenstecker
Partner - Creator II
Partner - Creator II
Author

Wow, thanks for the quick hint!

It works, and also for my real life Data!

Need some time to think about the nested use of if and aggr 🙂

Great!