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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Mahadevaraobc
Helper II
Helper II

Variance calculation

Hi Everyone,

Im having difficulty in achieving the following, please help.



I have created a Table visual as below.



Country Serial No actual budget diff %
USA ? 89 78 -11 -14.10%
USA AA 7 6 -1 -16.67%
USA AB 2 3 1 33.33%
USA BC 12 7 -5 -71.43%
USA DD 453 461 8 1.74%
USA FF 196 216 20 9.26%
USA GG 183 170 -13 -7.65%
USA HH 12 14 2 14.29%
USA II 1 1 0 0.00%
USA JJ 10 7 -3 -42.86%
USA KK 210 247 37 14.98%
USA LL 146 146 0 0.00%
USA MM 4067 4093 26 0.64%
USA NN 1 1 0 0.00%
canada ? 1045 918 -127 -13.83%
canada AA 1 5 4 80.00%
canada AB 86 40 -46 -115.00%
canada BC 1999 1899 -100 -5.27%
canada DD 4 2 -2 -100.00%


What i want is:

1) When no county is selected all serial number values should be summed up and show diff and diff in %

2) if any country is selected only serial numbers to that country should be summed and diff and diff in % should be shown
1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

I assume the % is the issue. You will need SUMX for the diff column, then the % will work. 

 

https://exceleratorbi.com.au/use-sum-vs-sumx/

 

the complication is you have 2 columns that define the unique list (country and serial).  The correct formula depends on you table structure. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

1 REPLY 1
MattAllington
Community Champion
Community Champion

I assume the % is the issue. You will need SUMX for the diff column, then the % will work. 

 

https://exceleratorbi.com.au/use-sum-vs-sumx/

 

the complication is you have 2 columns that define the unique list (country and serial).  The correct formula depends on you table structure. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.