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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Mandalorian
Frequent Visitor

Creating Variance Column in Table Matrix with Values as Rows

I am trying to create a variance column for a YoY calculation in the P&L below. I cannot figure out how to calculate this variance since the P&L is a table matrix with values as rows. The year columns are from my date table and only have 2 years.

Mandalorian_0-1689622284235.png

Below is the formula that is not working. The formula does not calculate the difference between the years and I am unable to put the formula in the columns section above or below the Year field. Is there a way to add a variance field or is there an easier way to build a P&L in PBI?

Variance =
Var PY = CALCULATE(SELECTEDMEASURE(), FILTER('Date Table', 'Date Table'[Year] = 2022))
Var CY = CALCULATE(SELECTEDMEASURE(), FILTER('Date Table', 'Date Table'[Year] = 2023))
Var Result =
CY - PY
Return Result
1 REPLY 1
Anonymous
Not applicable

Hi @Mandalorian ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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