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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.