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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
admin11
Memorable Member
Memorable Member

SALES_ after replace as SALES_M , it give error msg

Hi All

 

Below expression working for last 3 year :-

 

SALES_YOY =
var _max = format(today(),"MMDD")
return
calculate(Sum('SALES'[SALES_]),DATESYTD('DATE'[Date]),format('DATE'[Date],"MMDD")<=_max)

Today i need to change the SALES_ to SALES_M , after i append the 2 table :-
 
SALES_YOY =
var _max = format(today(),"MMDD")
return
calculate(Sum('SALES'[SALES_M]),DATESYTD('DATE'[Date]),format('DATE'[Date],"MMDD")<=_max)
 
I get the below error msg :-
 

Column 'SALES_M' in table 'SALES' cannot be found or may not be used in this expression.

 

The fact is SALES_M is there. see below image :-

admin11_1-1654557524676.png

 

Paul

 

2 REPLIES 2
Anonymous
Not applicable

Hi @admin11,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@admin11 , SalesM is measure

 

Try

 

SALES_YOY =
var _max = format(today(),"MMDD")
return
calculate(('SALES'[SALES_M]),DATESYTD('DATE'[Date]),format('DATE'[Date],"MMDD")<=_max)
 
or
 
SALES_YOY =
var _max = format(today(),"MMDD")
return
calculate(Sumx('SALES',[SALES_M]),DATESYTD('DATE'[Date]),format('DATE'[Date],"MMDD")<=_max)
 
 
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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.