Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello Everyone,
I am trying to recreate a report that pulls data out of an Access DB into Excel then pivots are created from said data. I am pulling the data directly from the data source instead of Access so that we can retire the Access DB. What I am trying to do is a grouping based on month similar to what you can do in an Excel Pivot table. In the screenshot below you can see that a Starting at and Ending at date is defined (I would like this to be dynamic), the grouping is done by month, and the resulting data is grouped by the Ending at year and showing < 1/1/[Starting at year] for all periods before the Ending at year. Again, I would prefer this to be dynamic, and would also prefer to show the month name instead of number. I have figured out that I can create a YYYY MM field that changes dynamically, but that does not give me the month name. Please let me know if any of this makes sense and if more information is needed.
Excel Example
Power BI Formula Without Month Name
Period Grouping =
Power BI Example Without Month Name
Solved! Go to Solution.
Hi @Greg_Z,
This should help you. https://drive.google.com/file/d/1ArLIICzpmJjmDqs7EVyIm8_DMENOlqqj/view?usp=sharing
If you follow the steps in the query editor it will get you the desired results. Add the group and the index to the visualization. Then sort the visual on the elipsis menu.
I should just further add that as this is a calculated column, it is computed in advance, therefore if you go back to last year, you won't get the <1/1 prefix for 2020.
Hi, see code below to give you what you need.
Hi Davehaus,
Thank you for the reply! However, I have already tried that and it does not work because I cannot sort by the correct year and month. The periods need to show in the correct order (i.e. < 1/1/2022 then 2022 January then 2022 February then 2022 March).
Hi, there's a couple ways around this. You can try and sort the calculated column by the date column in the ribbon. Another way would be to do everything in Power query and create an index key to sort by.
Hi Davehus,
I will look into Power Query and indexing because you cannot sort by the date column in the ribbon because there are multiple period values per date; they have to be 1-to-1 (I tried that already as well). Thank you for the advice!
Hi @Greg_Z,
This should help you. https://drive.google.com/file/d/1ArLIICzpmJjmDqs7EVyIm8_DMENOlqqj/view?usp=sharing
If you follow the steps in the query editor it will get you the desired results. Add the group and the index to the visualization. Then sort the visual on the elipsis menu.
Thank you Davehus! I appreciate all of the help!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |