aggregate-functions


Calculate window average in tableau


I've got a data set that contains several tables: orders, order_items, and billings. Orders and Billings will have one row per orderID, but order_items could have multiple rows per orderID. OrderIDs can belong to one of 4 locations.
I'm trying to calculate, for each location, what the average billing total is using Tableau. However, when I do an avg(billing total) across locations, it looks like Tableau first adds the value of billing totals across all rows, so if one order has multiple order_item rows it will add the billing total together to get the "total" for that orderID -- then it takes the average of those.
Is there a way to have Tableau calculate an average across orderIDs without adding sub-fields together? Or to tell it specifically to aggregate at the orderID level, without adding orderID to the row/column shelf?
I know that this is an old question, but this is a problem that is now easily solvable with LOD expressions. This is more information on LOD's.
Without seeing your data or the workbook I would think that it will look something like this:
{FIXED [orderID] : AVG([total billing]}
Edit your table Calculation--> select advance setting take in Location OrderID in this order click ok
at level Drop Down Select Location
at restarting Every OrderID
or you could use a new calculated field : {Fixed [OrderID], [Location] : AVG(Order)
if possible a sample image with dummy data of what you want to achieve with just 3-5 rows would help

Related Links

Querying customDimensions in Google Bigquery
NHibernate - QueryOver criteria appearing in Where instead in Having clause, error
Howto aggregate on full data set in Spring Batch jobs?
Creating an aggregate function fails
Necessity of declaration of function in c and cpp
Calculate window average in tableau
Complexity asymptotic relation (theta, Big O, little o, Big Omega, little omega) between functions
What are TOP_COUNT and TOP_MAXCOUNT in BigQuery?
marklogic need advise for approach to aggregate documents
multiply(num) aggregate function in postgresql
Binding the Result of an Aggregate Function to a Projected Variable
tableau aggregate data based on dimension
where clause and aggregate functions
Is there such a thing as a join() aggregate function that concatentates field values at a specific character?
Aggregation of an expression in Django query spanning multiple tables
How to aggregate / roll up percentile measures

Categories

HOME
asp.net
http
oop
redux
gsm
process
mysqli
microcontroller
psexec
browserstack
virtualhost
subprocess
aspectj
distinct
fine-uploader
hdf5
oxid
saucelabs
opengrok
github-flavored-markdown
box2d
background-image
cucumberjs
url-parameters
ajaxcontroltoolkit
tcpdf
gsuite
datastax-enterprise
knapsack-problem
ballerinalang
android-6.0-marshmallow
proof-general
dynamic-memory-allocation
units-of-measurement
lines
angularjs-resource
tunnel
wit-ai
headphones
mapquest
pygraphviz
stdin
motion
nsdateformatter
armadillo
usernotifications
bzip2
flume-ng
vpython
nshttpurlresponse
inner-join
html-entities
encoder
appcmd
runtime-permissions
visio-2010
audio-fingerprinting
enet
petapoco
overhead
scrollmagic
lightspeed
alfred
class-design
jira-agile
csc
audiorecord
paypal-subscriptions
abstract
jquery-draggable
controlpanel
ios8-share-extension
angular-promise
persian
hexagonal-tiles
log-analysis
waterline
jeet-grid
valdr-bean-validation
applinks
fiware-health
frisby.js
illegalargumentexception
mind-manager
api-eveonline
yosemite
pytz
ios-enterprise
nest-initiative
drawable
msdropdown
rails-migrations
episerver-7
dateadd
rda
code-smell
email-headers
kuka-krl
mysql-error-1146
stringstream
coinbase-php
antixsslibrary
libx264
esi
openafs
netbiscuits
sqlbuddy
nsundomanager
apache-commons-email
cherokee
xhtmlrenderer
system-analysis
linq-to-mysql
code-golf
newspeak
glassfish-embedded
appointment
rpxnow
opengl-to-opengles
file-icons
stackless
memory-consumption

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App