Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Tee_dubs
Contributor III
Contributor III

Aggr monthly data by year

I have monthly data on our product

I would like to find the average per year for each product. But only if i have a full years data.

I need this as both a KPI and in a Scatter.

Here is what i have so far.  I am not getting the expected results.

Avg({<productID={=Age >1}>}aggr(sum(Value),reportingYear,ProductID))

Im happy to do this in the load script as a new yearly values table, although it would be great to be able to drill down. 

Labels (1)
4 Replies
saminea_ANZ
Creator
Creator

Perhaps this?

Avg(TOTAL <reportingYear> Aggr(Sum(Value), ProductID))

Since, there is a restriction factor. We need to think like below

Avg({<productID={"=Age>1"}>} TOTAL <reportingYear> Aggr(Sum(Value), ProductID))

Tee_dubs
Contributor III
Contributor III
Author

That's not valid syntax

Tee_dubs
Contributor III
Contributor III
Author

Sorry. It is actually valid. Ive not used the <> I'd anything other than set Analysis. What exactly are these brackets used for.

Ps. I am still not getting the expected value in the KPI box and it does not work at all in the Skatter with ProductID as the dimension

saminea_ANZ
Creator
Creator

When you say data is not valid. We can't promise since I don't have your data handy. Now, Time to share sample and expected result we will get it for you? 

TOTAL <Fieldname> will do based on Aggregate field per Year since your sentence like that "I would like to find the average per year for each product. But only if i have a full years data."

Can you try this?

Avg({<productID={"=Age>1"}>} TOTAL <reportingYear> Aggr(Sum({<productID={"=Age>1"}>} Value), ProductID))