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
MarnikV
Regular Visitor

Parallelperiod syntax error

I'm trying to create a DAX measure for the previous month or year sales, but it keeps throwing the following error:

 

 monthproblem.PNG

 

If I replace MONTH by YEAR it gives me the same error, only then it says the syntax for YEAR is incorrect. What's wrong here?

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

Maybe put ;Month instead of ,Month.

 

 




Lima - Peru

View solution in original post

3 REPLIES 3
kcantor
Community Champion
Community Champion

@MarnikV  Oddly enough, don't use all caps. Use Year and Month as YEAR and MONTH mean different things.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Vvelarde
Community Champion
Community Champion

Maybe put ;Month instead of ,Month.

 

 




Lima - Peru

Can't believe I missed that... Thanks!

But now it doesn't return anything? Looks like the values of Total Revenue LY are null...

 

lynull.PNG

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.