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.
Hi you all,
I'm hoping you can help me out on something. I've created a dax measure which gives me a distinct count of a contact column on two filters, one which is a column filter value (contribution status) , another is the count of a column of a summarize function (the contact should have at least 2 contribution_bk).
Ideally I want to have a rolling 12 month view of this measure with a year-quarter hierarchy The expected behaviour and results should be :
The dax measure:
Solved! Go to Solution.
Hi @mike_sjief ,
Consider creating a separate metric to calculate rolling 12-month totals rather than using it directly in an existing metric.
Try modifying the following formula:
Rolling12M_CountOfDistinctContacts =
CALCULATE (
[CountOfDistinctContacts],
FILTER (
ALLSELECTED ( dim_calendar ),
dim_calendar[d_date]
IN DATESINPERIOD ( dim_calendar[d_date], MAX ( dim_calendar[d_date] ), -12, MONTH )
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @mike_sjief ,
Consider creating a separate metric to calculate rolling 12-month totals rather than using it directly in an existing metric.
Try modifying the following formula:
Rolling12M_CountOfDistinctContacts =
CALCULATE (
[CountOfDistinctContacts],
FILTER (
ALLSELECTED ( dim_calendar ),
dim_calendar[d_date]
IN DATESINPERIOD ( dim_calendar[d_date], MAX ( dim_calendar[d_date] ), -12, MONTH )
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Adamk,
this is indeed what I tried just after I posted it. It worked. Your dax is a bit more elegant so I greatly appreciate your reply.
Kind regards,
Mike