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: 
Not applicable

Expression Problem

Hi,

My need is to return only the field with type number (eliminate the fields that contain string or character)

I wrote this expression.

Avg({<isNum($(Bruttoeinkommen))={-1}>}Bruttoeinkommen) the editor sgow me Expression ofk but there isn#t any returned data

15 Replies
sunny_talwar

Try this:

Avg(If(IsNum(Bruttoeinkommen), Bruttoeinkommen))

or

Avg({<Bruttoeinkommen = {"=IsNum(Bruttoeinkommen)"}>}, Bruttoeinkommen)

Colin-Albert

AVG is a numeric expression so will exclude any non-numeric data.

AVG(Bruttoeinkommen) should work.

Chanty4u
MVP
MVP

may wrks with

Avg(Field)

Count of rows with no nulls?

Anonymous
Not applicable
Author

Maybe.

Avg(If(IsNum(Bruttoeinkommen)=-1, Bruttoeinkommen))

or

Avg(If(IBruttoeinkommen='-1', Bruttoeinkommen))

Regards

Not applicable
Author

I try All but I still have the same problem :

For the salary average I get illogical result with Avg(): every day I get Information about the salary (I get null also as a value )with different criteria so when I try to find the AVG() it return a biiig biiig amount !!!!!!!

I thought it is problem of AVG but it seems to be another problem ???

some one could help me how should I think to get the AVG()

sunny_talwar

Can you share a sample showing the issue?

Not applicable
Author

My data is  Like This  but it is very huge . I want to get the average salary : for each criteria:

DaySalaryExperience Sector
Apr 07 2016 12:35:49 GMT470003IT
Apr 07 2016 12:33:31 GMT90.00015Business
Apr 07 2016 12:43:16 GMT11400020Sales
Apr 07 2016 12:42:34 GMT6000015IT
Apr 07 2016 12:43:12 GMT98.00010Business
Apr 07 2016 12:41:55 GMT450005Sales
Apr 07 2016 12:46:31 GMTnull6IT
Apr 07 2016 12:45:52 GMT75.0007Business
Apr 07 2016 12:46:31 GMT37th8Sales
Apr 07 2016 12:48:03 GMT800009IT
Apr 08 2016 12:49:40 GMT9600010IT
Apr 08 2016 12:49:40 GMT9500011Sales
Apr 08 2016 12:49:40 GMT16500012sales
Apr 08 2016 12:49:40 GMT9000013other
sunny_talwar

What is the criteria here? Expected output?

sunny_talwar

Created a cycle group with Day, Experience and Sector as dimensions.

When we are on Experience, you would see this:

Capture.PNG

When on Sector

Capture.PNG