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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi
Is it possible to have a table of matrix that shows for each month the # of unique Cutomer ID for the last 12 months within each month. Example Jan-2021 value would show the # of unique customer ID over the last 12 calender month.
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
Did you have a calendar table. You need to build one and create an one to many relationship between it and your fact table.
Then you can use the following measure:
Measure =
VAR CURRENTDATE =
MAX ( Date[Date] )
RETURN
CALCULATE (
DISTINCTCOUNT ( Sales[CustomerID] ),
DATESINPERIOD ( 'Date'[Date], CURRENTDATE, -1, YEAR ),
ALL ( Date )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Anonymous ,
Did you have a calendar table. You need to build one and create an one to many relationship between it and your fact table.
Then you can use the following measure:
Measure =
VAR CURRENTDATE =
MAX ( Date[Date] )
RETURN
CALCULATE (
DISTINCTCOUNT ( Sales[CustomerID] ),
DATESINPERIOD ( 'Date'[Date], CURRENTDATE, -1, YEAR ),
ALL ( Date )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.