Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression not working as expected

I am having problem with the below expression

=count(if(aggregate<avg({$<MonthEndDate ={$(vMaxSecDate)}>}aggregate),1))

I am using the above expression in a straight table and Sector is my dimension.

Can someone help me what mistake I am doing?

Regards

15 Replies
johnw
Champion III
Champion III

If I've understood what you want, this seems to work:

count({<Val={"<$(=avg({<Clas={'Advertising'},Date={'$(=max(Date))'}>} Val))"}>} Clas)

Not applicable
Author

Hi John, Thank You

If you see the graph for Advertisng with out any metric (Met)  selection max value is 12.12 and number of points that fall below are 6.. so I am trying to get the points below the avg(val) at max date..

johnw
Champion III
Champion III

Ah, I misunderstood the requirement.  I think you want this:

-sum(aggr(avg(Val)<$(=avg({<Clas={'Advertising'},Date={'$(=max(Date))'}>} Val)),Clas,Date))

Not applicable
Author

Hi John ,

Seems to be working fine for Advertising ..but for other clas in primary clas_type it returns wrong value and also doesn't work for Secondary Clas_type.

Also why are we specifying the 'Advertising' in the expression.

Thanks for your time.

swuehl
MVP
MVP

Try

=sum(aggr(if(avg(Val)<  avg(Total<Clas> {<Date={'$(=Date(max(Date)))'}>} Val),1),Clas,Date))

Regards,

Stefan

Not applicable
Author

Thank You Swuehl !!!