Forum Discussion

tory_hhl's avatar
tory_hhl
New Member
3 years ago
Solved

Average (excluding other columns)

I have data by diff carriers and expenses are coming from diff dates and diff currencies. 

I would like to see the ratio of  monthly expenses against the average expense (total expenses by carrier and divide the months) 

I tried the measure below, but it's calculated average by days instead of month. 

avg exp by carrier =
CALCULATE(
    AVERAGE('Sample Data'[exp_usd])
    ,FILTER(
        ALLSELECTED('Sample Data'),
        'Sample Data'[Carrier Name]=MAX('Sample Data'[Carrier Name])))

 

 

Data:

Carrier NameDateCurrencyExpFXUSD
UPS1/1/2023USD515
FedEx1/2/2023USD616
UPS1/2/2023GBP61.27.2
FedEx1/4/2023USD717
UPS2/1/2023USD818
FedEx2/1/2023EUR81.18.8
UPS2/2/2023USD919
FedEx3/3/2023USD10110
UPS3/11/2023EUR111.112.1
FedEx3/11/2023USD11111
UPS3/31/2023USD12112
FedEx3/31/2023USD13113
UPS4/1/2023USD14114
FedEx4/5/2023USD15115
UPS4/8/2023USD16116
FedEx4/8/2023GBP161.219.2
UPS4/8/2023USD17117
FedEx5/1/2023USD18118
UPS5/5/2023USD19119
FedEx6/9/2023USD20120
UPS6/15/2023USD21121