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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mkane12
Frequent Visitor

Time Calculations in Calculation Groups - add month name

is it possible to add the month date to the calculation group instead of it just saying current month, prev month, prev month+1 , prev month+2, etc?

 

mkane12_0-1744736381697.png

 

7 REPLIES 7
v-dineshya
Community Support
Community Support

Hi @mkane12 ,

Thank you for reaching out to the Microsoft Community Forum.

 

You'll need to update the Calculation Group name column to use a dynamic format based on the current date context.

Can you please follow this steps:

Open Tabular Editor (either in Power BI Desktop or as a standalone). Go to your Calculation Group (e.g., "Time Intelligence"). Locate the Name or DisplayName expression (the one that controls what’s shown in the visual). Replace it with a DAX expression that calculates the actual month name.

DAX measure for Calculation Group name:

VAR CurrentDate = SELECTEDMEASURE()
VAR MonthOffset = SELECTEDVALUE('Time Intelligence'[Offset])
VAR TargetDate = EOMONTH(TODAY(), MonthOffset)
RETURN FORMAT(TargetDate, "MMM YYYY")

Note: This assumes you have an Offset column in your Calculation Group with values like 0 for current month, -1 for previous month, 1 for next month, etc.

If you still want to include labels like “Current Month” alongside the date:

DAX :

VAR Offset = SELECTEDVALUE('Time Intelligence'[Offset])
VAR Label =
SWITCH(Offset,
0, "Current Month",
-1, "Previous Month",
1, "Next Month",
-2, "Previous Month -1",
2, "Next Month +1",
BLANK()
)
VAR TargetDate = EOMONTH(TODAY(), Offset)
RETURN Label & " (" & FORMAT(TargetDate, "MMM YYYY") & ")"

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

Thank you

thanks, but I am a little confused. Where exactly am i putting this? For example, this is my current month calc. Can you point me in the right direction or show me an example? Sorry, i'm a newbie at power bi.  

mkane12_0-1744818170481.png

 

uzuntasgokberk
Super User
Super User

Hello @mkane12 ,

 

I hope that I understand correctly. İnstead of Current Month, Previous Month etc. you'd like to see Today month for example April. So that, you'd like to see April, March, February and January. İf it so,

You can use workaround solution with textbox or with card. I'm showing text solution which is easy way.

First create a measure for example CurrentMonth:

uzuntasgokberk_0-1744748978414.png

Second, create a text box in the insert tab. And then click text box you'll se a box. Within the box click Value button and write your measure name and save. 

uzuntasgokberk_1-1744748997975.png

 

Lastly, you can insert a shape if you'd like to visualize more suitable way and in format tab click bring to front. That means you have 2 visualization in the same are so that the text box needs to be shown.

 

Best Regards,
Gökberk Uzuntaş

LinkedIn: https://www.linkedin.com/in/g%C3%B6kberk-uzunta%C5%9F-b43906198/

Medium: https://medium.com/@uzuntasgokberk

 

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

Hi @mkane12 ,

If @uzuntasgokberk  response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found his response helpful.

Thank you

HI @mkane12 ,

If @uzuntasgokberk  response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found his response helpful.

Thank you

HI @mkane12 ,

If @uzuntasgokberk  response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found his response helpful.

Thank you

HI @mkane12 ,

If @uzuntasgokberk  response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found his response helpful.

Thank you

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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