Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get 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

Reply
cchilton
Helper I
Helper I

Dynamic Date Grouping

I have a date manipulation requirement where the user should be able to select the "Number of Groups" and "Number of Days Per Group" they want to view the data. 

 

Example: 

I achieved this using Direct Query, SQL Statements, and Dynamic M parameters. However, due to performance issues we need to switch the project to Import Mode. I need to do this using Import mode. I cannot use Dynamic M parameters in Import mode. 

1.png

 

I found this article which is similar to what I want to do, but I cannot get it to work for with dates. 

https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-count-of-b... 

Does anyone know how I can use bins/dynamic binning / measures to achieve the same result? 

 

5 REPLIES 5
cchilton
Helper I
Helper I

Is anyone able to assist with this? This is a very importan company requirement. If you are unable to help can I submit a support ticket with Microsoft for help? How do I get this resolved. 

vanessafvg
Super User
Super User

can you provide some sample data, with what your expected output is?  hard to help meaninfully without that information.  provide sample data in text format or share from a cloud drive with a correct answer to test against.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I am not sure what you mean by sample data? The image is my expected output. User should be able to select "num of groups" and "num of days" in each group. 

 

2.png

how do you get from here to there...

you need sample data, either your actual data or data that is reflective of your data, (in text format not images)

 

I dont understand what the data looks like before it gets that result?  its impossible to give a solution without all the  required information.  You cannot test without the before and after.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I made a mock up of something similar to what I have been doing in Power BI. Does this help? I cannot get "Grouped Dates" to work as expected in this model because this sample data uses an excel spread sheet and import mode while I used SQL server and direct query.  I used Power Query to try to do something similar to what I was doing in my SQL query but it did not really work. I am stuck because I cannot dynamically change "number of groups" and "number of days per group." 

https://www.dropbox.com/scl/fi/tcvjzacczd4ugpgltjdz9/pbi-sample-data-set.pbix?rlkey=ar72d7jd9mxdz7b4... 

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.