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: 
Manish
Creator
Creator

FirstsortedValue and Current selection issue

Hi All

I have written the below mentioned expression to get branch where the count is max , which is working fine.

FirstSortedValue(Branch,-aggr(Count(DISTINCT{<DateFlag={'ReSub'},Id={"=Sum({<DateFlag={'ReSub'}>}[No Of Resubmission])<>0"}>} Id),Branch))

 

Now i dont want my output to be impacted or changed on a selection of a branch.

How can i achieve that ??

any help would be appreciated.

Many thanks

 

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this

FirstSortedValue({<Branch>} Branch,-aggr(Count(DISTINCT{<Branch, DateFlag={'ReSub'},Id={"=Sum({<Branch, DateFlag={'ReSub'}>}[No Of Resubmission])<>0"}>} Id),Branch))

Or

FirstSortedValue(Only({<Branch>} Branch),-aggr(Count(DISTINCT{<Branch, DateFlag={'ReSub'},Id={"=Sum({<Branch, DateFlag={'ReSub'}>}[No Of Resubmission])<>0"}>} Id),Branch))

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

View solution in original post

1 Reply
Anil_Babu_Samineni

Perhaps this

FirstSortedValue({<Branch>} Branch,-aggr(Count(DISTINCT{<Branch, DateFlag={'ReSub'},Id={"=Sum({<Branch, DateFlag={'ReSub'}>}[No Of Resubmission])<>0"}>} Id),Branch))

Or

FirstSortedValue(Only({<Branch>} Branch),-aggr(Count(DISTINCT{<Branch, DateFlag={'ReSub'},Id={"=Sum({<Branch, DateFlag={'ReSub'}>}[No Of Resubmission])<>0"}>} Id),Branch))

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