Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 = |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
24 | |
16 | |
12 | |
12 | |
8 |
User | Count |
---|---|
31 | |
27 | |
16 | |
15 | |
12 |