Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Greetings,
I have a matix that consist of dynamic columns. The data consist of reports that are Jan-Dec. Each month has it's own Jan thru Dec totals in each file, see below left side. Currently I am testing Jan-Mar first. I would like for whichever columns are selected by the user to equal a measure which is the "variance" column. Is this possible? See below picture. Any assistance would be greatly appreciated. I need a "variance" column to replace the "Total" column.
Solved! Go to Solution.
Thanks everyone. I found it on another thread. I found this code and used it, but it only worked once I have a sum total next to it.
var mmax = CALCULATE(max(DataProfile[Units]),allselected(Contacts[Name])) var mmin = CALCULATE(min(DataProfile[Units]),allselected(Contacts[Name])) return mmax-mmin
I will come return to give credit. Thanks.
Thanks everyone. I found it on another thread. I found this code and used it, but it only worked once I have a sum total next to it.
var mmax = CALCULATE(max(DataProfile[Units]),allselected(Contacts[Name])) var mmin = CALCULATE(min(DataProfile[Units]),allselected(Contacts[Name])) return mmax-mmin
I will come return to give credit. Thanks.
His user name is "Ibenlin".
Option 1. Remember that your measure is calculated four times in a matrix visual. Change the formula for the column totals to variance
Option 2. Alternatively consider using visual calculations.
Thank you, I will try that and get back to you. Besides just changing the option to variance which looks crazy, it gives me zeros.
yeah, that's not going to work. I need a variance for 2 selected months. I'll just let him know that is the limit and makes sense.
Hi,
So if you have selected 3 months (as shown in the picture), then how should variance be calculated?
Thanks Ashish. I need a variance for 2 selected months. I'll just let him know that is the limit and makes sense.
I am suggesting to my client that they only compare 2 at a time or do a visual. Two is difficult enough,also it would make any sense to try to get a variance from 3 or more.
Thank you, I have posed that very question to him, I am awaiting feedback. 🙂
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 51 | |
| 42 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 139 | |
| 116 | |
| 53 | |
| 37 | |
| 31 |