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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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