Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm making calculated buckets based on the date difference. Currently, the bucket is generated based on the last date of the current month as below measure.
Solved! Go to Solution.
@Anonymous , make sure the names are correct.
Also try like , You need have some grouping level for this. I assumed - BIItemLedgerRF[Bill ID]
Measure =
var _min =MINX(allselected(Parameter),Parameter [Parameter Value])
return
CALCULATE(SUM(BIItemLedgerRF[CostAmountActual]),filter(values(BIItemLedgerRF[Bill ID]) , DATEDIFF(_min,max(BIItemLedgerRF[PoDate.PoDate]),DAY)<30))
You need to get dynamic bucketing. Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
also refer date diff across table
@Anonymous
It can't be used in this expression because logical expressions under CALCULATE can't contain measures. They can only be of this form (more or less):
F(T[Col]) <operator> Value,
where Value is a constant and F is a function that depends only on one column in a base table, never measures.
Therefore, first capture the value of the measure in a variable and then use the variable in a well-formed expression. And you don't need any MIN around the parameter value. You should also follow Best Practices when formatting and writing DAX code. Otherwise, you'll get into trouble rather sooner than later.
@Anonymous Found the solution from another user. Till today I have not followed formating since I was transferred to DAX from M query very recently. Thank you for aware me of best practising on DAX code and for the reference.
@Anonymous , make sure the names are correct.
Also try like , You need have some grouping level for this. I assumed - BIItemLedgerRF[Bill ID]
Measure =
var _min =MINX(allselected(Parameter),Parameter [Parameter Value])
return
CALCULATE(SUM(BIItemLedgerRF[CostAmountActual]),filter(values(BIItemLedgerRF[Bill ID]) , DATEDIFF(_min,max(BIItemLedgerRF[PoDate.PoDate]),DAY)<30))
You need to get dynamic bucketing. Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
also refer date diff across table
The method you mentioned has worked. Additionally by following the references you mentioned, found this article https://www.credera.com/insights/creating-aging-report-using-a-user-selected-date-in-power-bi on how to handle bucketing.
Thank you @amitchandak
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
9 |