Forum Discussion
How to create variance field and variance %
Hello all,
i'm beginner and just want to know how i can create the variance of column 1 and 2 and also the variance %
the numbers 1 until 5 represent columname MONTH and the products represent columnname PRODUCT.
Kind regards,
Rega
Hi Anonymous,
You can create measures below:
Variance = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=1))-CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=2))
Variance % = DIVIDE('Table1'[Variance],CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),'Table1'[Month]=1)))
By the way, I would suggest you display those two measures in card visuals. As you use matrix visual to display data originally, if we add two measures to this matrix, two measures values will display under each column group, means under 1, 2,...,5, each will have three columns. It will make the matrix messy, as you just want to return variance between the 1 and 2.
Best Regards,
Qiuyun Yu
8 Replies
- v-qiuyu-msft
Community Support
Hi Anonymous,
You can create measures below:
Variance = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=1))-CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=2))
Variance % = DIVIDE('Table1'[Variance],CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),'Table1'[Month]=1)))
By the way, I would suggest you display those two measures in card visuals. As you use matrix visual to display data originally, if we add two measures to this matrix, two measures values will display under each column group, means under 1, 2,...,5, each will have three columns. It will make the matrix messy, as you just want to return variance between the 1 and 2.
Best Regards,
Qiuyun Yu- AnonymousNot applicable
HI v-qiuyu-msft,
Thanks for your advise. But what if want to have measures which calculate the variance and variance % between month 2 and 3 or 4 and 5 ? So to have a flexible measurements?
- klabir
Helper V
- TripsM
Advocate I
How did you get the Table reference to work? I can't find table names or anything similar to that using the current PowerBI Desktop.
- aks_joFrequent Visitor
This saved me from a lot of tension and helped me to achieve the result what I wanted to. Thanks for this query.
- Greg_Deckler
Community Champion
Do you mean like:
Variance = [1] - [2] Variance% = ([1] - [2]) / [1]
- AnonymousNot applicable
- DavidAnthony
Helper II
Here’s how you can calculate the variance and variance % between two columns using Flexa Tables — no DAX needed
Steps in Flexa Tables:
Open your Power BI report and select the Flexa Tables visual.
Add your data fields — for example:
Column 1 → current period (e.g., This Year Sales)
Column 2 → previous period (e.g., Last Year Sales)
In the Flexa Tables toolbar, click on the Analytics button (📊 icon).
Choose Variance → Flexa Tables will automatically:
Create a new column showing the Variance (Column1 – Column2)
Create another column showing the Variance % ((Column1 – Column2)/Column2)
You can rename, format, or reorder these variance columns directly in the table — no formulas, no DAX.