Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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?
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.
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:
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.
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
User | Count |
---|---|
17 | |
16 | |
14 | |
13 | |
12 |
User | Count |
---|---|
17 | |
14 | |
12 | |
10 | |
9 |