Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Calculating across columns using IF and variable

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.
1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Could you please share sample data and clarify more details about your requirement.

 

Regards,

Jimmy Tao

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors