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
IAmCare
Frequent Visitor

SamePeriodLastYear

Maybe I am missing something but shouldnt the current for 2017 be the Last for 2018?  Here is my code

Current = CALCULATE(COUNTROWS('FactWholesale'))

Last = CALCULATE([Current],SAMEPERIODLASTYEAR('DimDate'[Date]))

 

578 for 2018 and 594 for 2017 is correct for the current but shouldnt  last for 2018 be the current for 2017 which is 594

 

 

 

 

Capture.JPGmething but shouldnt the cu

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

You should not have a year in the Fiscal month column.  In the DimDate Table, extract the Month using the =FORMAT([Date],"mmmm").  Drag this Month column in the visual.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I am getting this error mesage

when i do this

Capture.JPG

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I think I know what is going on.  Our fiscal month

September 2017 ran from

8/28/2016 -  10/01/2016

 fiscal month

September 2018 ran from

8/27/2017 -  9/30/2017. 

Our fiscal calendar  ends on the last Saturday of the month.  Is there a way to get the sameperiodlastyear to work with this type of monthly set up?

@IAmCare,

 

For any time intelligence function, you could implement a custom DAX formula.

https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I do not know how to share the link to my PBIX without sharing all of my work, which I do not want to do.

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.