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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

Use Debtors Age Bracket as Measure for Axis - Debtors Age analysis

I really need some clever inspiration.

I create a debtors age analysis dynamically for the selected month-end date.


The two important date measures are 1) Age in days and age bracket which uses age in days.

Age in days

Age =
var selecteddate =
CALCULATE ( MAX( MonthEndDates[myDate] ), ALLSELECTED ( MonthEndDates ) )
var myage =
return IF(myage <0, -1,MYAGE)
and Age bracket
AgeBracket = if([Age] <0, "Current",
if([Age] <= 30, "Current",
IF([Age] <= 60, "30",
IF([Age]<=90 , "60",
IF([Age] <= 120, "90",
I want to use Age Bracket as Axis for Graph. As it is a measure I cannot use it.
I thought about the workaround using a calculated table and convert the AGE and AgeBracket measures to calculated columns, but as the selection date is dynamic, I cannot access the SELECTEDVALUE or ALLSELECTED slicer value in a column to calculate the date difference between the selected date and discharge date.


Hope I explain it correctly. 





Community Champion
Community Champion


Have you tried Binning the ages?

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Thanks, it appears as if PowerBI does not allow binning on a measure column.





Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.