Calculate application cost as pct of total cost for all applications

Hi All,

I tried a few DAX measures/ formulas but my results did not work to calculate the annualized cost of an application as a percent of total cost for all applications.

Example:

700 applications covering 4 year period. So 2800 rows. For each application per year I need the cost of each application as a percentage of total cost of all 700 applications within given year. Basically a weighted average. Please provide example DAX that I can use

Thank you,
Brian

I used ALLSELECTED and it works.

ALLSELECTED Tot Cost = CALCULATE([Total Cost], ALLSELECTED(Cost Fact Table))

App pct of total  cost = [Total Cost] / [ALLSELECTED Tot Cost]

Thanks

Ok great.

Thanks
Sam