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

How to find TAT between two dates, for top complaints

Hello Everyone,

I have to find the name of top raised complaints, where no of the issues reported are highest.

I am using below formula which gives me the name of Complaints which count is highest.

=FirstSortedValue(comp_name, -Aggr(Count(complaint_id),comp_name)) gives me O/P as 'Machine not working'

 

To calculate TAT in general, I am using below expression, where TAT I have calculated in script itself (difference between two dates).

round(Avg({<status={'X'}, Tableflag={'abc'}, date={">=$(=Date(Yearstart(Today(),0,4),'YYYY-MM-DD'))"}>} TAT))

 

Now I have to calculate TAT for highest raised complaint ('Machine not working'), how to do that.

 

I am facing issue while trying to combine above two formulas.

 

Please suggest, urgently need help on this.

 

Regards

 

 

 

Labels (2)
1 Solution

Accepted Solutions
SerhanKaraer
Creator III
Creator III

Hello abc,

You can filter comp_name with the highest comp_name.

round(Avg({<status={'X'}, Tableflag={'abc'}, date={">=$(=Date(Yearstart(Today(),0,4),'YYYY-MM-DD'))"},

comp_name={"$(=FirstSortedValue(comp_name, -Aggr(Count(complaint_id),comp_name)))"}

>} TAT))

To simplify expression text, you can use variables as this:

round(Avg({<status={'X'}, Tableflag={'abc'}, date={">=$(=Date(Yearstart(Today(),0,4),'YYYY-MM-DD'))"},

comp_name={"$(HighestCompVariable)"}

>} TAT))

View solution in original post

3 Replies
abc_18
Creator II
Creator II
Author

SerhanKaraer
Creator III
Creator III

Hello abc,

You can filter comp_name with the highest comp_name.

round(Avg({<status={'X'}, Tableflag={'abc'}, date={">=$(=Date(Yearstart(Today(),0,4),'YYYY-MM-DD'))"},

comp_name={"$(=FirstSortedValue(comp_name, -Aggr(Count(complaint_id),comp_name)))"}

>} TAT))

To simplify expression text, you can use variables as this:

round(Avg({<status={'X'}, Tableflag={'abc'}, date={">=$(=Date(Yearstart(Today(),0,4),'YYYY-MM-DD'))"},

comp_name={"$(HighestCompVariable)"}

>} TAT))

abc_18
Creator II
Creator II
Author

Hi  SerhanKaraer,

 

Thank you very much for your help, working as expected. 

 

Regards