Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My expression :
avg(aggr(COUNT({1<country={"$(=only(country))"}, vehicleStatus={0}, dealer-={'-'}>} vehicleStatus), dealer, country))
I need somehow to tell it that it must not react to 'dealer'.
With this expression when I choose dealer, it reacts to it.
You have two aggregation functions in you expression.
avg( aggr( COUNT( {1<country={"$(=only(country))"}, vehicleStatus={0}, dealer=>} vehicleStatus), dealer, country))
You need to ignore dealer in the outer avg aggregation as well. Try this:
avg({$<dealer=>}aggr(COUNT({1<country={"$(=only(country))"}, vehicleStatus={0}, dealer=>} vehicleStatus), dealer, country))
If You want all the records then that's why you must have used the 1 in the set analysis. If not that might create an error.
for excluding the dealer just write the equation like this.
avg(aggr(COUNT({1<country={"$(=only(country))"}, vehicleStatus={0}, dealer=>} vehicleStatus), dealer, country))
I've tried that as well.. Can't seem to get out of this one..
it blocks on country but if I choose dealer it just sums them up instead of avg count
Ideally this should work, try to breakdown the equation into parts,
avg(aggr(COUNT({1<country={"$(=only(country))"}, vehicleStatus={'0'}, dealer=>} vehicleStatus), dealer, country))
COUNT({<country={"$(=only(country))"}, vehicleStatus={'0'}, dealer=>} vehicleStatus)
,also, check for if the condition is running after the country in the code.
COUNT({<country=, vehicleStatus={'0'}, dealer=>} vehicleStatus)
You have two aggregation functions in you expression.
avg( aggr( COUNT( {1<country={"$(=only(country))"}, vehicleStatus={0}, dealer=>} vehicleStatus), dealer, country))
You need to ignore dealer in the outer avg aggregation as well. Try this:
avg({$<dealer=>}aggr(COUNT({1<country={"$(=only(country))"}, vehicleStatus={0}, dealer=>} vehicleStatus), dealer, country))
Thank you! It worked just as I needed!
I have 2 more field i need, this are only avg() of some field per country
I have this:
avg({<country=country>}currentPrice)
but this still reacts to "dealer" and I've seen everything should be ok. Do you know anything about this mr Vegar