Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi PowerBI-ers,
The company I work for closes month end ordering process on different days. sometimes they will close the 1st day of the next month, sometimes the 2nd day. But it the 1st day of the new month is a Saturday, they may not close until the 3rd or 4th of the month. I have the following meaure for showing the monthl text for one of my card headings:
Label MTD Budget = FORMAT(TODAY()-3,"MMMM") & " MTD Budget"
and this of course reads as
August MTD Budget
today because it's the 2nd of sept and - 3 days is still August. This is ok this month but I will have to change this measure every month depending on the day the business rolls over.
For all my calculations is fine becuase I just change the page filter when the new month rolls over but I don't want to have to change my 2 measures that I have also, it's not really in the spirit of automation. Neither is changing filters I know but that doesn't bother me.
Anyway, is there anyway that the text "MMM" (August) could also be switched when I change the page filter?
Solved! Go to Solution.
actually, all good the card had a filter on it, all good no bug, I worked this out by myself but thanks anyway guys!
@Anonymous - Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
All I want to do is change the month for a label when I update a filter. But I actually worked it out.
first I have the measure:
Label Month Switch With Filter = MIN(Date_Master_T[Month Name])
That returns the first month from my date table, then I use this measure in the following:
Label MTD Budget = [Label Month Switch With Filter] & " MTD Budget"
and the output is a card label that reads:
August MTD Budget
when the page filter is set to August.
works with all labels except one, it doesn't return any month at all when I switch the filter to September, weird, any ideas on why? the card label is exactly the same but different results.
actually, all good the card had a filter on it, all good no bug, I worked this out by myself but thanks anyway guys!
Hi @Anonymous ,
Glad to hear that,could you pls mark the reply as answered to close it?
@Anonymous , for any date you can get last date like
format(eomonth([date],-1),"MMM")
So you can put logic and find eomonth with -1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |