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
admin11
Memorable Member
Memorable Member

what is the right way to name a field ?

Hi All

 

I have below expression :-
 
Sales_2020 = CALCULATE([SALES_], DATESYTD(DATEADD('Date'[Date],-1,YEAR)))
 
Since above expression in next year , the field will need to change to 2021.
 
May i know it is possible to make the tbale label for this field auto change to Sales 2021 , so that don;t need to maintian.
 
admin11_0-1621748546144.png

 

Paul
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@admin11 

The formula that you have created will work regardless of the year that you are in. It always calculates the previous year-to-date sales from the current year that is in the filter context. You should rename your measure as "Previous Year YTD Sales" for better clarity.


 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@admin11 

The formula that you have created will work regardless of the year that you are in. It always calculates the previous year-to-date sales from the current year that is in the filter context. You should rename your measure as "Previous Year YTD Sales" for better clarity.


 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

admin11
Memorable Member
Memorable Member

@Fowmy 

Thank you very much.

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.

Top Solution Authors