You can't reference another measure from the formula of a different measure.
But what you can do is save the expression as a variable in the load editor using the SET script command as follows
Set vSales='sum(Sales)' ;
And then be able to use the variable in the formula of a measure. Just make sure to use the dollar sign expansion syntax as follows to invoke the string of characters within the variable as a dynamic expression
sum(Costs) / $(vSales)
Thanks for the quick reply Jonathan. I'm having an issue with this. I got the measure stored in a variable called "vHotelCost". My expression or measure is "Sum([Book Rate (Hotel)]) * Sum(Nights) * Sum(Guests)". So I tried using the following measure in my bar chart to display the percent of spend in each hotel city:
Sum([Book Rate (Hotel)]) * Sum(Nights) * Sum(Guests) / $(vHotelCost)
That did not work. So I tried the following:
Sum([Book Rate (Hotel)]) * Sum(Nights) * Sum(Guests) / Sum(Total $(vHotelCost))
That did not work either. Any suggestions?
Joshua , i'm thinking something like this. Its a guess without working with your app.
Sum( [Book Rate (Hotel)] * Nights * Guests)
Sum( TOTAL [Book Rate (Hotel)] * Nights * Guests)
If this works , then you can take the denominator or numerator 'as is' and set it in a variable in the load, reload and then update the expression to invoke the variable instead.