7 Replies Latest reply on Dec 15, 2017 8:47 AM by Vasudeva Veeragandham

# How to multiply Non aggregate and aggregate in Tableau

Hi Tableau Master,

I am facing one problem in tableau , I have two columns A and B

i have to multiply both like A * Count(B) , But Tableau is throwing error 'Cannot mix aggregate and non aggregate columns'

• ###### 1. Re: How to multiply Non aggregate and aggregate in Tableau

If you can supply some simple mock data (only a few rows) and an example of what outcome you are looking for this would help.

• ###### 2. Re: How to multiply Non aggregate and aggregate in Tableau

Hi John,

Looking for below

A.PRICE*COUNT(B.ID))

Price has values like this  -

6.77

6.76

6.79

6.72

6.55

and  ID has Values Like this

2069

2070

2071

Here we need do count(ID) i.e - 3, Then Multiple 3*Price

nothing but count(ID)*Price

Expecting Results

3*6.77 =

3*6.76 =

• ###### 3. Re: How to multiply Non aggregate and aggregate in Tableau

Hi Vasu,

Try with

Count(ID)* Sum(Price)

If it not works then attach workbook.

Thanks

sankar

• ###### 4. Re: How to multiply Non aggregate and aggregate in Tableau

Thank you for the reply , i dont think so it will work because i dont want sum of price * count (ID).

It will give wrong values

• ###### 5. Re: How to multiply Non aggregate and aggregate in Tableau

Try with

Count(ID)* MAX(Price)