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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Same Column Variance

Hello,  I have Table "Vendor_Rate" where I want to find out  product price difference against "Current Rate" for all the vendors : Vendor 1 Rate, Vendor 2 Rate , Vendor 3 Rate

 

 

Rate                      | Price |         Variance

Current Rate            150

Vendor 1 Rate          200 

Vendor 2 Rate          500

Vendor 3 Rate           70

Vendor 4 Rate           50

I am using measure :  Rate Difference = SUM(Vendor_Rate[Price])-CALCULATE(SUM(Vendor_Rate[Price],Vendor_Rate[Rate]="Current Rates")

 

I am looking to find price Variance and Varince % against "Current Rate"

 

Thank you in Advance

IK

1 ACCEPTED SOLUTION

@Anonymous 

You just need to change the [Current Price] measure to hold onto the city filter.

Current Price = 
CALCULATE (
    [Vendor Price],
    ALLEXCEPT( Vendor_Rate, Vendor_Rate[City] ),
    Vendor_Rate[Rate] = "Current Rate"
)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you so much, greatly appreciated

jdbuchanan71
Super User
Super User

Hello @Anonymous 

I broke it into a couple measures so we would have them to use other places if needed.

Vendor Price = SUM ( Vendor_Rate[Price] )
Current Price =
CALCULATE (
    [Vendor Price],
    ALL ( Vendor_Rate ),
    Vendor_Rate[Rate] = "Current Rate"
)
Variance = [Vendor Price] - [Current Price]
Variance % = DIVIDE ( [Variance], [Current Price] )

VendorVariance.jpg

 

Anonymous
Not applicable

Thank you so much. Only one thing is missing. 

 

I have rates for mutiple cities such as city 1, city 2, city 3, City 4. With above Current Price measure , its calculating all cities current rate. How do I measure it per city? 

 

I appreciate your help 

@Anonymous 

You just need to change the [Current Price] measure to hold onto the city filter.

Current Price = 
CALCULATE (
    [Vendor Price],
    ALLEXCEPT( Vendor_Rate, Vendor_Rate[City] ),
    Vendor_Rate[Rate] = "Current Rate"
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.