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
Hello guys,
I'm working with a matrix, and I conted the number of whipment splitted by Area (rows) and year-month (columns).
I'd like to add one more column, but I fond some issues when I try to create the new measure.
My idea is to create a column that shows the % of variation in comparison with the last n months (let's say 2 month).
So, for example, the measure for March for the 2° row will make this calculation:
Average(13:16) [average of 2° row monhts January and February]
/
24 [value of 2° row for March]
Do you have any idea to help me?
Thank you very much!!
Solved! Go to Solution.
Hi @pasno ,
1.Create a calendar table.
Calendar =
ADDCOLUMNS (
CALENDAR ( MIN ( 'Table'[Date] ), MAX ( 'Table'[Date] ) ),
"YearMonth",
YEAR ( [Date] ) & "-"
& MONTH ( [Date] )
)
2.Create a What-if parameter and put it into a slicer.
3.Create this measure.
Percentage =
DIVIDE (
DIVIDE (
CALCULATE (
SUM ( 'Table'[Value] ),
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Table'[Date] ), -3, MONTH )
)
- SUM ( 'Table'[Value] ),
[Parameter Value]
),
SUM ( 'Table'[Value] )
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @pasno ,
1.Create a calendar table.
Calendar =
ADDCOLUMNS (
CALENDAR ( MIN ( 'Table'[Date] ), MAX ( 'Table'[Date] ) ),
"YearMonth",
YEAR ( [Date] ) & "-"
& MONTH ( [Date] )
)
2.Create a What-if parameter and put it into a slicer.
3.Create this measure.
Percentage =
DIVIDE (
DIVIDE (
CALCULATE (
SUM ( 'Table'[Value] ),
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Table'[Date] ), -3, MONTH )
)
- SUM ( 'Table'[Value] ),
[Parameter Value]
),
SUM ( 'Table'[Value] )
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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!