5 Replies Latest reply: Aug 15, 2014 6:11 PM by Jerome Pfeiffer

# Simple average calculation - Showing as a guage

I have travel expenses by type of travel expense. Albeit  airfare, meals, rental...etc. I want the average priced paid for airfare. I need to know how to only select type equal to airfare and then perform the math of total Airfare / count of airfare type. I like to show it in a guage chart.

• ###### Re: Simple average calculation - Showing as a guage

Hi,

try using set analysis like this for airfare:

sum( {<Type={airfare}>} price) / count( {<Type={airfare}>} price)

Hope this helps

Tobias

• ###### Re: Simple average calculation - Showing as a guage

gauge only needs an expression, so maybe (replace with name of your fields and upper/lowercase)

avg ({\$ <type={airfare}>} expenses)

• ###### Re: Simple average calculation - Showing as a guage

sum({<[Expense Type]={Airfare (Employee Ticket Only)}>}[Travel Expense])/count({<[Expense Type]={Airfare (Employee Ticket Only)}>})

Current expression won't work

• ###### Re: Simple average calculation - Showing as a guage

Hi,

use:

sum({<[Expense Type]={'Airfare (Employee Ticket Only)'}>} [Travel Expense] )/count({<[Expense Type]={'Airfare (Employee Ticket Only)'}>}[Travel Expense])

Tobias

• ###### Re: Simple average calculation - Showing as a guage

This worked but in the gauge chart I can’t get the avg price to appear and how do I get the minimum vale and maximum value to appear?