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
Sure this has been asked, but the "suggestions" I'm finding I either don't understand or do not apply to my particular situation. My data assigns all transactions that occur in a month to the last day of the month (i.e. 1.21.23, 1.25.23, 1.27.23 would all be "stamped" as 1.31.23). The business requirement is for alll the date headers both across and down in the pivot table be in the format "mmm yyyy" (Jan 2023). So I create my date dimension with all dates and the Month category in the appropriate format:
Date FMT_Date
1/25/2022 | Jan 2022 |
1/26/2022 | Jan 2022 |
1/27/2022 | Jan 2022 |
1/28/2022 | Jan 2022 |
1/29/2022 | Jan 2022 |
1/30/2022 | Jan 2022 |
1/31/2022 | Jan 2022 |
2/1/2022 | Feb 2022 |
2/2/2022 | Feb 2022 |
2/3/2022 | Feb 2022 |
2/4/2022 | Feb 2022 |
2/5/2022 | Feb 2022 |
2/6/2022 | Feb 2022 |
2/7/2022 | Feb 2022 |
2/8/2022 | Feb 2022 |
2/9/2022 | Feb 2022 |
2/10/2022 | Feb 2022 |
… | |
1/24/2023 | Jan 2023 |
1/25/2023 | Jan 2023 |
1/26/2023 | Jan 2023 |
1/27/2023 | Jan 2023 |
1/28/2023 | Jan 2023 |
1/29/2023 | Jan 2023 |
1/30/2023 | Jan 2023 |
1/31/2023 | Jan 2023 |
2/1/2023 | Feb 2023 |
2/2/2023 | Feb 2023 |
2/3/2023 | Feb 2023 |
And of course the following apply:
So what is the simplist (pronounced - with the least amount of programming) to achieve the desired result?
Solved! Go to Solution.
Hello,
You can add another column to your date table in the format YYYYMM to sort your MMM YYYY table on (the below should work). That would solve the error message you're getting and allow you to sort.
FORMAT ( 'Dates'[Date], "YYYYMM" )
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Proud to be a Super User! | |
Hello,
You can add another column to your date table in the format YYYYMM to sort your MMM YYYY table on (the below should work). That would solve the error message you're getting and allow you to sort.
FORMAT ( 'Dates'[Date], "YYYYMM" )
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Proud to be a Super User! | |
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 |
---|---|
18 | |
18 | |
17 | |
15 | |
13 |
User | Count |
---|---|
36 | |
35 | |
20 | |
18 | |
18 |