The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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! |
|
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |