The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello everyone,
At the moment i have slicers like this, but i would like to change the format so that it shows YY instead of YYYY.
so that it would show 15 16 17 18 19 20 21.
Is this possible and how to do so?
This is the current setting.
When i change it to Date
it shows like this:
Solved! Go to Solution.
Hi @WouterAalders ,
Based on my test, we can not format a four-digit integer to a two-digit number. So you have to add a new column in your code, like this.
Calendar =
ADDCOLUMNS(
CALENDAR(DATE(2019,1,1),TODAY()),
"Year", YEAR([Date]),
"YearFromat", FORMAT([Date], "yy")
)
Best Regards,
Winniz
Hi @WouterAalders ,
Based on my test, we can not format a four-digit integer to a two-digit number. So you have to add a new column in your code, like this.
Calendar =
ADDCOLUMNS(
CALENDAR(DATE(2019,1,1),TODAY()),
"Year", YEAR([Date]),
"YearFromat", FORMAT([Date], "yy")
)
Best Regards,
Winniz
You can't format 2022 to 22. It's a number, not a date.
You can:
1. Create another column that will have those numbers you want and use it for the slicer.
2. What you probably saw is that you can format a date column in this custom way. So let's say for each year I would have a date with the first day of the year on the entire rows of that year I could format it as "yy".
In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |