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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I want to subtract the value from the year 2022 - 2021, can someone help me for creating measure so i can put the diffrence value just below the 2021,2022 row.
i created below measure which gives 2 years value while selecting only one year in the slicer.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file whether it suits your requirement.
New Lease Count Measure: =
VAR _recenttyear =
CALCULATE ( MAX ( Data[Year] ), ALL ( Data[Year] ) )
VAR _previousyear = _recenttyear - 1
VAR _diff =
CALCULATE ( SUM ( Data[NewLeaseCount] ), Data[Year] = _recenttyear )
- CALCULATE ( SUM ( Data[NewLeaseCount] ), Data[Year] = _previousyear )
RETURN
SWITCH (
TRUE (),
ISINSCOPE ( Data[Year] ), SUM ( Data[NewLeaseCount] ),
ISINSCOPE ( Data[Month] ), _diff
)
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file whether it suits your requirement.
New Lease Count Measure: =
VAR _recenttyear =
CALCULATE ( MAX ( Data[Year] ), ALL ( Data[Year] ) )
VAR _previousyear = _recenttyear - 1
VAR _diff =
CALCULATE ( SUM ( Data[NewLeaseCount] ), Data[Year] = _recenttyear )
- CALCULATE ( SUM ( Data[NewLeaseCount] ), Data[Year] = _previousyear )
RETURN
SWITCH (
TRUE (),
ISINSCOPE ( Data[Year] ), SUM ( Data[NewLeaseCount] ),
ISINSCOPE ( Data[Month] ), _diff
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 16 | |
| 10 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 15 | |
| 11 | |
| 10 |