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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
tatenda24
Frequent Visitor

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
tatenda24
Frequent Visitor

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.

parry2k
Super User
Super User

@tatenda24 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.

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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