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
pbi_newie
Frequent Visitor

Creating variance columns based on dynamic month and scenario selection in a matrix

Hi All,

 

I am trying to create variance columns in a matrix table where the columns could have dynamic data selected form slicers e.g. scenario could be actual, budget, outlook which is is then shown by period i.e. months selected from the slicer.

 

I'd like variance columns to the right based on selections made. My table currently looks as follows:

 

pbi_newie_2-1678054874951.png

 

My data is coming from a database on a server (which i do not control).

 

Any help would be much appreciated.

 

Thanks!

 

3 REPLIES 3
pbi_newie
Frequent Visitor

Bump

amitchandak
Super User
Super User

@pbi_newie , a simple measure should do. if [Budget] ,and [Actual] are measures, a new measure

 

Variance = [Budget] - [Actual]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks 

 

Budget and Actuals are not different columns. There is only one column for Amounts. So basically my dataset looks something like the below:

 

pbi_newie_0-1678107964929.png

 

I tried creating a new measure as follows but it doesn't work as i'm not able to add it to the existing matrix.

 

Variance =
VAR Actuals = CALCULATE(Table[Amounts], Table[Scenario]="Actuals")
VAR Budget = CALCULATE(Table[Amounts],Table[Scenario]="Budget")
RETURN
Budget-Actuals

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.