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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Power BI experts,
I am calculating the inflation impact based on this calculation logic.
(Monthly weighted average price in this year's month - Monthly weighted average price in previous year's month) * Quantity in this year's month *(-1)
The basic logic (Pattern A) is done as per the below, but I realized that there are exceptions since we don't have transactions every single month, such as patterns B and C.
Could someone help me with building dynamic DAX logic with this sample data? Big thank you in advance!
Sample data and detailed explanation:
| This year's month | Last year's month | Action | |
| Pattern A | Yes | Yes | Include |
| Pattern B | No | Yes | Exclude |
| Pattern C | Yes | No | Excule if there is no transaction all the way to 24 months ago. |
Inflation impact = |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |