The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have built a file with a direct query to the data warehouse. I created a Calendar table. Month number is fine but Month names are not. I made the table by clicking the <Table Tools> New table icon.
[Snippet of where I entered the code]
Here is the code. Everything else appears to be working good.
Solved! Go to Solution.
Hi @Anonymous ,
Try this small change:
"MonthNameShort", FORMAT ( [Date], "mmm" )
Cheers,
Fernando
Hi @Anonymous ,
For my test, the first parameter in FORMAT() should be the whole date value not a single month number.
In your case, replace the "month" with "currentDay", then the month name will be correct.
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
For my test, the first parameter in FORMAT() should be the whole date value not a single month number.
In your case, replace the "month" with "currentDay", then the month name will be correct.
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
@Anonymous , I think typically generate calendar using add columns on top of Calendar
example
First Date =
var Weekstart = 2
return
ADDCOLUMNS (
CALENDAR ( DATE ( 2018, 01, 01 ), DATE ( 2020, 12, 31 ) ),
"Month Year", FORMAT ( [Date], "mmm-yyyy" ),
"Month Year sort", FORMAT ( [Date], "yyyymm" ),
"Month", FORMAT ( [Date], "mmm" ),
"Month Sort", FORMAT ( [Date], "mm" ),
"Year", YEAR ( [Date] )
)
You can add other columns as per need. For FY and Week of choice refer my blogs
1.Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441
2.Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482
Hi @Anonymous ,
Try this small change:
"MonthNameShort", FORMAT ( [Date], "mmm" )
Cheers,
Fernando
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
80 | |
78 | |
44 | |
39 |
User | Count |
---|---|
150 | |
116 | |
68 | |
64 | |
58 |