Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dandaanilreddy
Partner - Creator III
Partner - Creator III

how to get avg ?

Hello Developers

I have a expression like

=sum(goal_Reported_Out) - count({<count_id={' '},Bill_Type_Details-=>}DISTINCT Reported_Out_case_id)

How can i calculate avg of this expression. i tried but its giving error.

Can someone help me please?

Thanks

Anil

3 Replies
sunny_talwar

Did you use Avg(Aggr(.....)) when you tried? I think you need to provide some input data for us to show what you are trying to do. Just by looking at the expression, we all will have a hard time providing the correct answer.

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

Thanks for the reply bro.

I tried avg but its giving error. Can we create the below exp as a field in backend? The fields are from same table. if yes how to write this field in back end so that in the calculation i can do avg(sum(goals)- created field ) is it possible?

count({<count_id={' '},Bill_Type_Details-=>}DISTINCT Reported_Out_case_id)

Thanks

Anil

Anil_Babu_Samineni

We might achieve one way is this

IF count_id = IsNull(count_id) and Bill_Type_Details <> '*'

THEN

LOAD DISTINCT

          Field1,

          Field2 .... From Table;

ElseIf

Load Field1, Field2 .. FROM Table;

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