Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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