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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

dynamic date grouper based on date slicer selection

I need help on the following problem on a bar chart.
So if a date slicer selects a date, I would like for 4 date groupings (of total sales) determined by the date selected on the slicer.

Essentially I want the selected date on the slicer to the beginning of the first group(bin). if the first group(bin) is from (2016-05) then that bin and every other bin should be 11 months wide) therefore second bin would start 2017-04) and so forth. 
 
now I want this dynamic such that if any date is selected as the start date in the slicer(date selector), the following bins all change while accounting for the aforementioned parameters. 

 
Please help if you can! thank you very much 
4 REPLIES 4
Anonymous
Not applicable

need help and a solution on the following problem in the form of a bar chart;

So if a date slicer selects a date, I would like for 4 date groupings (of total sales) determined by the date selected on the slicer. Essentially I want the selected date on the slicer to the beginning of the first group(bin). if the first group(bin) is from (2016-05) then that bin and every other bin should be 11 months wide) therefore second bin would start 2017-04) and so forth. now I want this dynamic such that if any date is selected as the start date in the slicer(date selector), the following bins all change while accounting for the aforementioned parameters.

 

How would one achieve this through DAX? any other way of solving this is welcome too

link to sample data: https://drive.google.com/file/d/1ne9jZNEW7-eL3zgwNzaOHHgMZNkhulJX/view

Please help if you can! thank you very much.

@Anonymous ,

refer if this can help

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
parry2k
Super User
Super User

@Anonymous it will be easier if you share sample data and expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi there, this is the link to a sample file. 

 

As for expected results. I generally want to learn how to be able to bin total sales as per the dynamic groups(bins) of the dates that are determined by the slicer as mentioned above. hope the data can help you help me 

https://drive.google.com/file/d/1ne9jZNEW7-eL3zgwNzaOHHgMZNkhulJX/view?usp=sharing

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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