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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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! |
|