5 Replies Latest reply on Feb 22, 2017 7:05 PM by Braydon Davis

# Dividing FIXED LOD by aggregate measure issue

Hi,

Wondering how one would solve this:

measure 1: {FIXED "dimension1" : countd(dimension2) }

measure 2: countd(dimension2)

measure 3: measure 1 / measure 2 - error: cannot mix agg and non-agg arguments.

Thank you!

• ###### 1. Re: Dividing FIXED LOD by aggregate measure issue

attr([mesure1])/[measure2]

??

• ###### 2. Re: Dividing FIXED LOD by aggregate measure issue

No, that doesn't work unfortunately. It will give me 100% for all values.

measure 1: {FIXED "dimension1" : countd(dimension2) } - gives me counts by dimension 1. If I were to add these up, I get 1 million (don't want to divide by this number).

measure 2: countd(dimension2) - gives me counts of dimension 2. This total value is 700k (want to divide by this number).

Goal: To divide dimension 1 counts (measure 1) by the total number of counting dimension 2.

Example:

Candy = 600,000

Chips = 400,000

Divide Candy 600,000 by 700,000

Divide Chips 400,000 by 700,000

• ###### 3. Re: Dividing FIXED LOD by aggregate measure issue

Hi Braydon

To count all distinct "dimension 2" without considering any filter, use the LOD:

measure 2: {countd([dimension2]}

Hope this helps.

Yours,

Alfredo

• ###### 4. Re: Dividing FIXED LOD by aggregate measure issue

...  I forgot to add my test workbook ...

• ###### 5. Re: Dividing FIXED LOD by aggregate measure issue

Thanks Alfredo! This works!