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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AV_1998
New Member

Dynamic Buckets

 

Certainly! Here’s a revised version of your request in clear and professional English:


Hi Everyone,

We need to create aging buckets based on user-defined date intervals in Power BI. The user will provide the bucket ranges they wish to use for viewing data.

For instance, we have two date fields: one is a key date, which is input by the user, and the other is a net due date, which is already available in the table. For example, if the key date is March 2 and the net due date is January 1, the difference is 61 days. Users should be able to customize the bucket intervals as needed, such as 15-day intervals (e.g., 0-15, 15-30, 30-45) or 30-day intervals (e.g., 0-30, 30-60, 60-90).

Is there a way to handle this scenario in Power BI?

.

1 ACCEPTED SOLUTION
Ray_Minds
Continued Contributor
Continued Contributor

Hi @AV_1998 
Yes, you can handle this scenario in Power BI by using calculated columns or measures to create
aging buckets based on user-defined date intervals. Here's how you can approach it:
1. Create a Date Difference Column:
calculate the difference between the key date and the net due date in days. You can create
a calculated column in your data table for this:

Ray_Minds_0-1724922256788.png


2. Create a Parameter Table for Bucket Intervals:
You can create a parameter table to allow users to define their own bucket intervals. This table
can be created manually or dynamically using the “What-If” parameter feature in Power BI.
Example Parameter Table:
Interval Start: This will define the start of the bucket (e.g., 0, 15, 30, etc.).
Interval End: This will define the end of the bucket (e.g., 15, 30, 45, etc.)

 

Ray_Minds_1-1724922300207.png

3. Create a Calculated Column for Bucket Assignment:
Use a calculated column to assign each record to the correct bucket based on the date
difference:

Ray_Minds_2-1724922327573.png

 

If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

View solution in original post

2 REPLIES 2
Ray_Minds
Continued Contributor
Continued Contributor

Hi @AV_1998 
Yes, you can handle this scenario in Power BI by using calculated columns or measures to create
aging buckets based on user-defined date intervals. Here's how you can approach it:
1. Create a Date Difference Column:
calculate the difference between the key date and the net due date in days. You can create
a calculated column in your data table for this:

Ray_Minds_0-1724922256788.png


2. Create a Parameter Table for Bucket Intervals:
You can create a parameter table to allow users to define their own bucket intervals. This table
can be created manually or dynamically using the “What-If” parameter feature in Power BI.
Example Parameter Table:
Interval Start: This will define the start of the bucket (e.g., 0, 15, 30, etc.).
Interval End: This will define the end of the bucket (e.g., 15, 30, 45, etc.)

 

Ray_Minds_1-1724922300207.png

3. Create a Calculated Column for Bucket Assignment:
Use a calculated column to assign each record to the correct bucket based on the date
difference:

Ray_Minds_2-1724922327573.png

 

If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

_AAndrade
Super User
Super User

Hi @AV_1998,

Take a look at this post of Radacad:
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-count-of-b...

I think it can help you.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.