Does anyone know if it's possible to use or reference a measure in the Master Items / Library in another measure? For example, I have a measure in the library that calculates a total spend from various products. I'd like to create another measure that uses this but it would be easier / better to simply be able to add something like Sum([Products_Total]) with "Products_Total" being my library measure.
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
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: