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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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