Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I would like to display PreviousMonth name by comparing Today() currentmonth-1.
Thanks,
Vijay.
Solved! Go to Solution.
Hi Thanks Remi,
this works fine but thing is i would like to add this as a Dynamic text into my text box.
so i created this (Previous month = FORMAT(DATE("2000";MONTH(TODAY())-1;"01");"mmmm") as mesure
and tried to put in text box but it is not taking,but when i keep in Card it is working.
my actual requirement is to Display "January2017 Month Leaves" bold text along other text i want display in text box.
my query here is Can't we Display Measure along some Static Text in Text box.
Hi @Anonymous,
As you know, textbox only supports static text content, we are not allowed to add a measure into it.
To work around your requirement, you can append the static text to the dynamic Month value in measure and display it in Card visual. However, the limitation is that we cannot set "January2017" and "Month Leaves" to different font formats.
The measure could be:
Previous month = FORMAT(DATE("2000";MONTH(TODAY())-1;"01");"mmmm") & " Month Leaves"
Alternatively, you can use a Card to display dynamic Month value and use Text box to display static text. Adjust the position of Card to make it locate inside the Textbox so that the text looks like a entirety.
Regards,
Yuliana Gu
Another more flexible way of doing it
TYSM super helpful
Best answer! Thank you
Hello.
You can do this by creating an empty Query.
Go to Edit Query --> New Source --> Blank Query --> Paste the following code into the field --> name your Query (Should be Query1 by default).
= Text.Proper(Date.MonthName((Date.AddMonths(DateTime.Date(DateTime.LocalNow()), -1))))
Now you sould see a field named "Previuos Month" with previous months name.
Thank you so much this worked for me
Hello,
You have to get the current month from the Today() function, then display the name of previous month :
Previous month = FORMAT(DATE("2000";MONTH(TODAY())-1;"01");"mmmm")
It works for all month, I checked January 😉
Hi Thanks Remi,
this works fine but thing is i would like to add this as a Dynamic text into my text box.
so i created this (Previous month = FORMAT(DATE("2000";MONTH(TODAY())-1;"01");"mmmm") as mesure
and tried to put in text box but it is not taking,but when i keep in Card it is working.
my actual requirement is to Display "January2017 Month Leaves" bold text along other text i want display in text box.
my query here is Can't we Display Measure along some Static Text in Text box.
Hi @Anonymous,
As you know, textbox only supports static text content, we are not allowed to add a measure into it.
To work around your requirement, you can append the static text to the dynamic Month value in measure and display it in Card visual. However, the limitation is that we cannot set "January2017" and "Month Leaves" to different font formats.
The measure could be:
Previous month = FORMAT(DATE("2000";MONTH(TODAY())-1;"01");"mmmm") & " Month Leaves"
Alternatively, you can use a Card to display dynamic Month value and use Text box to display static text. Adjust the position of Card to make it locate inside the Textbox so that the text looks like a entirety.
Regards,
Yuliana Gu
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |