Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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
| Period | Forecast |
| P03 | 7000 |
| P03 | 8000 |
| P02 | 15000 |
| P02 | 56000 |
| RF12 | 1000 |
| RF12 | 25000 |
Solved! Go to Solution.
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 -
sample pbix - https://drive.google.com/file/d/1HaM63-KmwyXdkhGt89hhvKkMMuPHrGv0/view?usp=sharing
This is great, thank you so much.. you are a star!!
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 -
sample pbix - https://drive.google.com/file/d/1HaM63-KmwyXdkhGt89hhvKkMMuPHrGv0/view?usp=sharing
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 77 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |