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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Current month starting from the 16th (new problem)

Hello amazing Power BI community!

 

I hope someone can help me!

Some time ago I had this problem: https://community.powerbi.com/t5/Desktop/Current-Month-starting-from-the-16th/m-p/758664#M365643

 

So I know how to start the month from the 16th. Now I have another pproblem. The code i have used to show the current month (from the 16th of september to the 15th of october) looks like this:

 

CurrentMonth15 = 
Var First = FORMAT(IF(DimDate[DayofMonth]>=16;DATE(DimDate[år];DimDate[Monthof Year];16);IF(DimDate[DayofMonth]<=15;DATE(DimDate[år];DimDate[Monthof Year]-1;16)));"MM/YYYY")
var second = FORMAT(NOW();"MM/YYYY")

return 
IF(First = second;"yes";"No")

Now; My problem is, that when the 'real' month changed from the 30th of september to the 1st of october, the code shows the 'current month starting from the 16th' as the 16th of october to the 15th of november. I would like it to still show the 'current month' as the 16th of september to the 15th of october, until the 16th of october, where the month should then change to the 16th of october to the 15th of november. 

 

So in short; I would like my month (16th of september to 15th of october) to still be the 'current month' even though we switch months from september to october. I hope it makes sense! 🙂 

 

Antoher info: I have an entire dimdate table, I don't know if this will help with anything (dates, years, q's, ordinal date, day of week, weekending, etc.)

 

I am looking forward to hearing from you amzing PBI gurus! 😄 

4 REPLIES 4
Anonymous
Not applicable

Hi @Ashish_Mathur and @v-shex-msft 

 

Maybe this visual will give a better explanation:

medarbejder.PNG

We are currently in October, but as our timeregistration periode runs from the 16th of september to the 15th of october. Therefore I need the 'current month' to run from the 16th of september, even though we have enterd the 9th of october. On the 16th of october the 'current month' table should then change to show the dates from the 16th of october to the 1th of november. 

 

Currently, when we change months from september to october, the 'current month' (starting from the 16th) also changes. 

 

Sorry but i cannot understand.  May be someone else will help you.


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

Hi,

I am not sure of what you want but my guess is that you want to get the month name in the Calendar Table.  Your definition of a month is 16th of any month to 15th of next month i.e. July 16 to Aug 15 would be July.  Try this calculated column formula in the Calendar Table

=FORMAT(Calendar[Date]-16,"mmmm")

Does this work?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

Hmmm, it sounds like a common fiscal date issues.
I'd like to suggest you to add a calculated field to stored modify date. (current date -15) After these steps, you can use the new fiscal date as date axis of your visuals, it will group your records based on real date 'current month' 16th to 'next month' 15th.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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