0 votes
1 view
in BI by (15.1k points)
Hi, I'm new to tableau, when i use calculated fields, this error often pops up.

What does this error mean "Cannot mix aggregate and non- aggregate together" ?

1 Answer

0 votes
by (41.2k points)

Hi Vaibhav,

This happens when you are comparing a field with aggregate(field) such as 

IF [Sales] = MAX([Sales]) .......    Here this would throw an error same like yours.

To avoid this you can use Fixed LOD which converts the Aggregated measure into a single dimension to compare or use with a field. Aggregation such as MIN, MAX, SUM, AVG, etc.

IF [Sales] = { MAX([Sales]) } ...... would not throw an error.

So use Fixed LOD to do such comparisons

To learn more about Tableau, go through this tutorial

https://intellipaat.com/blog/tutorial/tableau-tutorial/introduction-tableau/

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...