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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have use the below Formula in Power BI and it is working fine if i choose 2023 and 2024 year both. If i choose alone 2024. It is not sum the Previous 2 months ie. 2023 year Nov and Dec.
Power BI formula I used-
@SriGanesh , Try using this formula this uses ALLfunction
CALCULATE(
SUM('REPAIR_UNIT_SUMMARY'[OBF_NUMERATOR]),
DATESINPERIOD(
'REPAIR_UNIT_SUMMARY'[MONTHYEAR],
LASTDATE(ALL('REPAIR_UNIT_SUMMARY'[MONTHYEAR])),
-3,
MONTH
)
)
Proud to be a Super User! |
|
It is calculating the Same value for all the rows.
DAX
CALCULATE(
SUM('REPAIR_UNIT_SUMMARY'[OBF_NUMERATOR]),
DATESINPERIOD(
'REPAIR_UNIT_SUMMARY'[MONTHYEAR],
LASTDATE('REPAIR_UNIT_SUMMARY'[MONTHYEAR]),
-3,
MONTH
),
PARALLELPERIOD(
'REPAIR_UNIT_SUMMARY'[MONTHYEAR],
-1,
YEAR
)
),
Try using this or share sample date
Proud to be a Super User! |
|
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
7 | |
4 | |
3 |