Forum Discussion
Time Intelligence - Last Date Overdue
- 3 years ago
I see that you said as new to Power BI, sharing this tip: Column value is persisted when you refresh the data. whereas Measure is calculated as and when needed.
I am providing the column syntax for you: (little bit detailed steps for your understanding)
Next Refill = var _Cust = 'Table'[Customer] var _DateDisp = 'Table'[Date Dispensed] var _MaxDate = CALCULATE( Max('Table'[Date Dispensed]), FILTER( all('Table'), 'Table'[Customer] = _Cust)) var _SameMaxDateRow = IF ( _DateDisp = _MaxDate, True, False) Return IF( _SameMaxDateRow , _MaxDate + 'Table'[Days], BLANK())Overdue = var _bufferDt = 'Table'[Next Refill] var _IsOverdue = IF ( _bufferDt >= TODAY() + 15, "FALSE", "TRUE" ) Return IF ( IsBlank('Table'[Next Refill]), BLANK(), _IsOverdue)FYI: Overdue has to be data type as text. If the data type is True/false, then all the blank values become false.
Hope this helps!
I see that you said as new to Power BI, sharing this tip: Column value is persisted when you refresh the data. whereas Measure is calculated as and when needed.
I am providing the column syntax for you: (little bit detailed steps for your understanding)
Next Refill =
var _Cust = 'Table'[Customer]
var _DateDisp = 'Table'[Date Dispensed]
var _MaxDate = CALCULATE( Max('Table'[Date Dispensed]), FILTER( all('Table'), 'Table'[Customer] = _Cust))
var _SameMaxDateRow = IF ( _DateDisp = _MaxDate, True, False)
Return IF( _SameMaxDateRow , _MaxDate + 'Table'[Days], BLANK())
Overdue =
var _bufferDt = 'Table'[Next Refill]
var _IsOverdue = IF ( _bufferDt >= TODAY() + 15, "FALSE", "TRUE" )
Return IF ( IsBlank('Table'[Next Refill]), BLANK(), _IsOverdue)
FYI: Overdue has to be data type as text. If the data type is True/false, then all the blank values become false.
Hope this helps!
Thanks sooooo much! this really help me understand the logic and also solve the problem.
- sevenhills3 years agoSuper User
Glad it worked! Thank you