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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
matrix_user
Helper III
Helper III

Display latest month with text "Mid" for certain dates.

Hello,

 

I am currently using this DAX measure to display the latest month in a card visual. Is they anyone who could help modify this measure to display just before the month, the word "Mid -" when I import mid month data into my Power BI. Mid month data being the 15th of each month. I am not sure how it would work if for mid-month reporting my data goes only till the 12th etc for that particular month.

 

L/month = Calculate(Format(Max('Facttable' [Entry date]), "MMMM" & "YYYY"))

 

Any help would be appreciate.

 

4 REPLIES 4
matrix_user
Helper III
Helper III

I am not sure why I would need to abandon my curernt calendar and rebuild with a customer code calendar. This would mean re-aligninging my measures to the new calendar. 

 

I thought it could be a possibility to rewrite the DAX I am using to pickup up any loaded dates that registers as the 15th and displays 'Mid' (of whatever month is the latest in the date loaded. I am not particulary wanting to display data or counts etc relevant to mid months, just display the term "Mid" June/July/September etc whenever it have mid month data loaded.

Hi @matrix_user ,

 

Maybe you can try this code:

if mid month = 
IF (
    DAY ( MAX ( 'table'[date] ) ) > 15,
    FORMAT ( MAX ( 'table'[date] ), "Mid mmmm" ),
    BLANK ()
)

 

 

Best regards.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ChenwuZhu_Gmail,

 

I tried but I am now getting 1i30 - January 1900

 

If mid month = IF(MAX('Calendar'[Day]) >15,

FORMAT(MAX('Calendar'[Day]) "Mid MMMM" & 'YYYY"), BLANK())

 

Thanks for the suggestion anyway.

 

amitchandak
Super User
Super User

@matrix_user , refer to my custom calendar code

https://medium.com/chandakamit/cheat-sheet-calendar-that-starts-with-any-date-of-the-month-just-two-...

DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

 

Then you need period rank and period day for time intelligence, which I have explained in

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.