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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.