Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculating sales based on customer account open date/year

Hi,
 
 I am trying to get the below measure to only calculate select year transactions based on open year date. For example customers who opened an account in 2021 I have a column which will show transactions generated by these customers based on their open month the transactions they also generated in 2021.
PBChecking01_1-1651245724332.png

 

 
 I tried to use this below measure it works but the only factor is is the transaction is giving current year transactions too.
 
Transacitons New Locations YTD = CALCULATE(sum(Transactions[transaciton_id]),USERELATIONSHIP(Location_Dimension[ACTIVATE_DATE_UTC],'Date'[Date]),Location_Dimension[ACTIVATE_DATE_UTC],YEAR(Transactions[date]) = YEAR(TODAY()))
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous ,Try if this can help

 

Transacitons New Locations YTD = CALCULATE(CALCULATE(sum(Transactions[transaciton_id]),USERELATIONSHIP(Location_Dimension[ACTIVATE_DATE_UTC],'Date'[Date])),filter(Location_Dimension, Location_Dimension[ACTIVATE_DATE_UTC]),filter(Transactions, YEAR(Transactions[date]) = YEAR(TODAY())))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi this one hasn't worked too.

 

I basically wanted a 

YEAR(Transactions[date]) = Year(Location_Dimension[ACTIVATE_DATE_UTC]) instead of today() but not sure how I can work round this as its not allowing me to do this. Please can you advise?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.