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
Anonymous
Not applicable

Previous Month Not working

Hi,

 

Can anyhone see what is wrong with this calculation... deos not seem to be working..

 

Previous Month := CALCULATE(SUM(Query[Net]),PREVIOUSMONTH(Table2[Date]))

 

Error message is saying the expression is not valid and the syntax for '(' is incorrect.

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Dan,

 

Was missing the relationship .. fixed now.;

 

Thanks

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

HI @Anonymous,

DAX formula is correct and no syntax error 

Month Not working.JPG

 

Please, check your Query and Table2 connection in relationship. It may be possibility that you haven't marked your date table as "Mark as a date table". Time intelligence function will only work if your custom date table is marked with "Mark as a date table"

Thanks,
Amit

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, it could work on my side:

1.PNG

Could you please share your file to have a test?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Dan,

 

Was missing the relationship .. fixed now.;

 

Thanks

themistoklis
Community Champion
Community Champion

@Anonymous

 

The syntax looks correct. 

 

Need to check the connection between the tables Query and Table2

 

Also make sure you dont have any redundant brackets in the formula

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.