Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |