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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Good afternoon!
I have data like
I made 2 measures: one for current month sales, one for current month plan and one for current month plan completion. They work fine. However, when I create a matrix in Power BI, total plan completion strangely sums all individual plan completion values for each channel:
How can I fix that?
Below are my measures:
CurrentMonthPlan :=
var CurrentYear = YEAR(TODAY())
var CurrenMonth = MONTH(TODAY())
RETURN
CALCULATE(
SUMX(FILTER('Sales',
YEAR('Sales'[Date]) = CurrentYear &&
MONTH('Sales'[Date]) = CurrenMonth
),
'Sales'[Plan]),
ALL('Sales'[date])
)
CurrentMonthActiveSales :=
var CurrentYear = YEAR(TODAY())
var CurrenMonth = MONTH(TODAY())
RETURN
CALCULATE(
SUMX(FILTER('Sales',
YEAR('Sales'[Date]) = CurrentYear &&
MONTH('Sales'[Date]) = CurrenMonth
),
'Sales'[Active sales]),
ALL('Sales'[date])
)
CurrentMonthPlanCompletion :=
var CurrentYear = YEAR(TODAY())
var CurrenMonth = MONTH(TODAY())
RETURN
CALCULATE(
SUMX(FILTER('Sales',
YEAR('Sales'[Date]) = CurrentYear &&
MONTH('Sales'[Date]) = CurrenMonth
),
'Sales'[CurrentMonthActiveSales] / 'Sales'[CurrentMonthPlan]),
ALL('Sales'[date])
)
Solved! Go to Solution.
Hi @darkmetrics
It's returning the total of the percentages added up because the SUMX function is telling it SUM the result of the 'Sales'[CurrentMonthActiveSales] / 'Sales'[CurrentMonthPlan]) calculation.
Since you have already defined CurrentMonth and CurrentYear in the CurrentMonthActiveSales and CurrentMonthPlan measures, I wonder if you can simplify the CurrentMonthPlanCompletion calculation as follows:
CurrentMonthPlanCompletion = DIVIDE( 'Sales'[CurrentMonthActiveSales], 'Sales'[CurrentMonthPlan] )
Thank you, I have removed my additional layer of summation and now it works fine.
Hi @darkmetrics
It's returning the total of the percentages added up because the SUMX function is telling it SUM the result of the 'Sales'[CurrentMonthActiveSales] / 'Sales'[CurrentMonthPlan]) calculation.
Since you have already defined CurrentMonth and CurrentYear in the CurrentMonthActiveSales and CurrentMonthPlan measures, I wonder if you can simplify the CurrentMonthPlanCompletion calculation as follows:
CurrentMonthPlanCompletion = DIVIDE( 'Sales'[CurrentMonthActiveSales], 'Sales'[CurrentMonthPlan] )
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.