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
Drogov4122
Regular Visitor

Calculating Variance between two categories and month

Hello,

I am seeking to find the fuel price (last column) variance between DOM and FTZ (third column) for each month and year. I have tried a variety of calculations, including the Quick Measure feature, however, am still struggling to find the proper solution. My apologizes if this is an easy fix as I am still new to PowerBi.

 

Clarification: All the data below lives in one table titled "WIP Table"

 

Thank You!

 

Screenshot 2023-08-08 140656.png

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Drogov4122 

Please try

Variance =
CALCULATE ( [Avg Fuel Price], 'Table'[DOM/FTZ] = "DOM" )
    - CALCULATE ( [Avg Fuel Price], 'Table'[DOM/FTZ] = "FTZ" )

Does not seem to work  - I am guessing because "Avg Fuel Price" is also part of the same table (i.e: DOM/FTZ, MONTH, YEAR and AVG FUEL PRICE are all part of "WIP Table"

@Drogov4122 

Then try

Variance =
CALCULATE ( AVERAGE ( 'WIP Table'[Avg Fuel Price] ), 'WIP Table'[DOM/FTZ] = "DOM" )
    - CALCULATE ( AVERAGE ( [Avg Fuel Price] ), 'WIP Table'[DOM/FTZ] = "FTZ" )

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.