Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.