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

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.

Reply
Anonymous
Not applicable

How to find the variance between two parameters?

Spoiler
Edited.

Hi, Sorry if this has been asked before.. Please can some one help?

 

I have the below data in Power BI.. 

 

I want it to show the variance between any two periods when selected using two slicers for Period in Power BI.. thanks

 

PeriodForecast
P037000
P038000
P0215000
P0256000
RF12

1000

RF1225000

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Anonymous ,

 

For this use case, I'd create two extra tables that hold the periods - these tables are disconnected(no relationship with) from the fact table - and then a measure for the variance.

 

Period1 = 
DISTINCT ( Data[Period] )
Period2 = 
DISTINCT ( Data[Period] )
Variance = 
CALCULATE (
    SUM ( Data[Forecast] ),
    Data[Period] = SELECTEDVALUE ( Period1[Period] )
)
    - CALCULATE (
        SUM ( Data[Forecast] ),
        Data[Period] = SELECTEDVALUE ( Period2[Period] )
    )

sampel output -

danextian_0-1656248741619.png

 

sample pbix - https://drive.google.com/file/d/1HaM63-KmwyXdkhGt89hhvKkMMuPHrGv0/view?usp=sharing 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This is great, thank you so much.. you are a star!!

danextian
Super User
Super User

Hi @Anonymous ,

 

For this use case, I'd create two extra tables that hold the periods - these tables are disconnected(no relationship with) from the fact table - and then a measure for the variance.

 

Period1 = 
DISTINCT ( Data[Period] )
Period2 = 
DISTINCT ( Data[Period] )
Variance = 
CALCULATE (
    SUM ( Data[Forecast] ),
    Data[Period] = SELECTEDVALUE ( Period1[Period] )
)
    - CALCULATE (
        SUM ( Data[Forecast] ),
        Data[Period] = SELECTEDVALUE ( Period2[Period] )
    )

sampel output -

danextian_0-1656248741619.png

 

sample pbix - https://drive.google.com/file/d/1HaM63-KmwyXdkhGt89hhvKkMMuPHrGv0/view?usp=sharing 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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