Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Ignore dimension modifier

Help! This is driving me mad!!!

I have a straight table with 2 dimensions and 2 expressions

I would like the 2nd expression to only take Dim1 into account. However, I get the following:

Dim1Dim2AVG({<GEN={'ALL'}>}AP)AVG({<GEN={'ALL'}>} TOTAL <Dim1> AP)

1

A44
1B11
2B22
2C55

When I change the dimension in the modifier

Dim1Dim2AVG({<GEN={'ALL'}>}AP)AVG({<GEN={'ALL'}>} TOTAL <Dim2> AP)

1

A44
1B11.5
2B21.5
2C55

I get what I would expect (see values for Dim2=B).

But with the first table (with Dim1 in modifier), I am not getting what I would expect.

What I want to see is:

Dim1Dim2AVG({<GEN={'ALL'}>}AP)AVG({<GEN={'ALL'}>} TOTAL <Dim1> AP)

1

A42.5
1B12.5
2B23.5
2C53.5

Where am I going wrong?!

1 Solution

Accepted Solutions
sunny_talwar

Another option could be to use Aggr(),

Aggr(NODISTINCT Avg({<GEN = {'ALL'}>} AP), Dim1)

View solution in original post

6 Replies
sunny_talwar

Would you be able to share a sample where you seeing this issue?

vishsaggi
Champion III
Champion III

The expression seems to be correct.

vinieme12
Champion III
Champion III

change the expression  to sum() / Count()

sum({<GEN={'ALL'}>} TOTAL <Dim1> AP)

/

Count({<GEN={'ALL'}>} TOTAL <Dim1> AP)
Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

But I don't see why Avg() won't work here

Capture.PNG

sunny_talwar

Another option could be to use Aggr(),

Aggr(NODISTINCT Avg({<GEN = {'ALL'}>} AP), Dim1)

jessica_webb
Creator III
Creator III
Author

Agreed that it seems to be the correct expression, so no idea why it won't work!

But the Aggr() function has worked to give me the outcome I was expecting, so thank you very much!