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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Joe6654
Frequent Visitor

Dynamic Column Variance Based on Year Selected with Slicer

I am relatively new to Power BI. I have a table that brings back the count of the number of controls tested per year based on the years selected in the slicer. I want to create a variance column next to the two years selected that automatically calculates the variance based on the years selected in the slicer.

 

For instance, for the view listed below, I want to see a variance for each control tested with the total amounting to 167. If I change the years, the variance would change accordingly.

 

Test1 Eample.JPG

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

Hi Joe6654,

 

Create a measure use DAX like below and try again:

 

Measure =
CALCULATE ( aggregation, ALLSELECTED ( table[Year] ) )

 

 

Regards,

Jimmy Tao

Thank you for your response.  I tried the fix but it did not work.

Hi Joe6654,

 

Use a table chart instead and put the measure in the chart and try again.

 

Jimmy Tao

Jimmy,

 

Thanks for your response.  When I switch to the table chart I still get an error.

 

 

Test2 Example.JPG

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors