Forum Discussion
Anonymous
3 years agoNot applicable
Count Days Between Two Dates in Same Column
I am building reports in powerbi using an established data model where the security in place prevents the ability to add columns; thus I must develop a measure to calculate the number of days between...
- 3 years ago
hi Anonymous
Try to plot a table visual with UniqueIdentifier and a measure like:daysbetween =VAR _date = MAX(TableName[EventDate])VAR _datepre =MAXX(FILTER(ALL(TableName[EventDate]),TableName[EventDate]<_date),TableName[EventDate])RETURNDATEDIFF(_datepre, _date, DAY)
Anonymous
3 years agoNot applicable
Other columns, as a minimum, would include:
Unique Identifier Field (each record/row)
Eventdate (referenced originally)
Title Field
Event Summary Field
Responsible Department Field
FreemanZ
Super User
3 years agohi Anonymous
Try to plot a table visual with UniqueIdentifier and a measure like:
daysbetween =
VAR _date = MAX(TableName[EventDate])
VAR _datepre =
MAXX(
FILTER(
ALL(TableName[EventDate]),
TableName[EventDate]<_date
),
TableName[EventDate]
)
RETURN
DATEDIFF(_datepre, _date, DAY)
- Anonymous3 years agoNot applicable
Thank you! I will try this!