Need: based upon a quarter selected in the filter, will calculate nine columns IF that quarter is in any of other nine columns. Details: 1. Project spending can occur 5 quarters prior to project start date, and three quarters after project start date. 2. Database has nine columns for quarter that the spend will occur. spendQtr6 in the database is calculated from project start date, while all other spendQtr columns are calculated from spendQtr6. 3. Database has nine columns for the capital$ spend. Users enter the data using a form. See example below. Problem: 1. In a matrix in Power BI the spend per quarter/year needs to be shown, regardless of which column that quarter/year is located. 2. Is there a code or a function that will look at the quarter/year columns and IF it matches a variable (based upon filter), calculate the capital columns that are associated with that quarter/year? 3. The quarter/year headings are a multi row card, which uses a variable to populate. Can that variable be used in a calculation or other script to populate the capital spending part of the matrix? Please give me some examples.